From 658d6923aeed72f8abca307410ab3f549f1f3401 Mon Sep 17 00:00:00 2001 From: missytake Date: Mon, 13 Nov 2023 17:04:00 +0100 Subject: [PATCH] Added MTA-STS records and .well-known file --- deploy-chatmail/src/deploy_chatmail/__init__.py | 4 ++-- deploy-chatmail/src/deploy_chatmail/nginx/mta-sts.txt.j2 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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