Skip to content

Commit

Permalink
only use mail_domain for now, not mail_server
Browse files Browse the repository at this point in the history
  • Loading branch information
missytake committed Nov 22, 2023
1 parent f08cba1 commit 6738cbf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions deploy-chatmail/src/deploy_chatmail/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def _configure_dovecot(mail_server: str, debug: bool = False) -> bool:
return need_restart


def _configure_nginx(domain: str, mail_server: str) -> bool:
def _configure_nginx(domain: str, debug: bool = False) -> bool:
"""Configures nginx HTTP server."""
need_restart = False

Expand Down Expand Up @@ -275,7 +275,7 @@ def _configure_nginx(domain: str, mail_server: str) -> bool:
user="root",
group="root",
mode="644",
config={"mail_server": mail_server},
config={"domain_name": domain},
)
need_restart |= mta_sts_config.changed

Expand Down Expand Up @@ -333,7 +333,7 @@ def deploy_chatmail(mail_domain: str, mail_server: str, dkim_selector: str) -> N
dovecot_need_restart = _configure_dovecot(mail_server, debug=debug)
postfix_need_restart = _configure_postfix(mail_domain, debug=debug)
opendkim_need_restart = _configure_opendkim(mail_domain, dkim_selector)
nginx_need_restart = _configure_nginx(mail_domain, mail_server)
nginx_need_restart = _configure_nginx(mail_domain)
mta_sts_need_restart = _install_mta_sts_daemon()

# deploy web pages and info if we have them
Expand Down
2 changes: 1 addition & 1 deletion deploy-chatmail/src/deploy_chatmail/nginx/mta-sts.txt.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: STSv1
mode: enforce
mx: {{ config.mail_server }}
mx: {{ config.domain_name }}
max_age: 2419200

0 comments on commit 6738cbf

Please sign in to comment.