diff --git a/deploy-chatmail/src/deploy_chatmail/__init__.py b/deploy-chatmail/src/deploy_chatmail/__init__.py index 7b80fb8b..7158b449 100644 --- a/deploy-chatmail/src/deploy_chatmail/__init__.py +++ b/deploy-chatmail/src/deploy_chatmail/__init__.py @@ -245,7 +245,7 @@ def _configure_dovecot(mail_server: str, debug: bool = False) -> bool: return need_restart -def _configure_nginx(domain: str, debug: bool = False) -> bool: +def _configure_nginx(domain: str, mail_server: str) -> bool: """Configures nginx HTTP server.""" need_restart = False @@ -275,7 +275,7 @@ def _configure_nginx(domain: str, debug: bool = False) -> bool: user="root", group="root", mode="644", - config={"domain_name": domain}, + config={"mail_server": mail_server}, ) need_restart |= mta_sts_config.changed diff --git a/deploy-chatmail/src/deploy_chatmail/nginx/mta-sts.txt.j2 b/deploy-chatmail/src/deploy_chatmail/nginx/mta-sts.txt.j2 index fc60e936..34d117e7 100644 --- a/deploy-chatmail/src/deploy_chatmail/nginx/mta-sts.txt.j2 +++ b/deploy-chatmail/src/deploy_chatmail/nginx/mta-sts.txt.j2 @@ -1,4 +1,4 @@ version: STSv1 mode: enforce -mx: {{ config.domain_name }} +mx: {{ config.mail_server }} max_age: 2419200