From c7625fad81154a30dffadcbf8a6b21630fb938b9 Mon Sep 17 00:00:00 2001 From: missytake Date: Mon, 13 Nov 2023 17:17:07 +0100 Subject: [PATCH] DNS: distinguish between mail_server and mail_domain --- .../src/deploy_chatmail/__init__.py | 2 +- scripts/generate-dns-zone.sh | 23 ++++++++++++------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/deploy-chatmail/src/deploy_chatmail/__init__.py b/deploy-chatmail/src/deploy_chatmail/__init__.py index 0dd152bb..05507e2a 100644 --- a/deploy-chatmail/src/deploy_chatmail/__init__.py +++ b/deploy-chatmail/src/deploy_chatmail/__init__.py @@ -295,7 +295,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) + nginx_need_restart = _configure_nginx(mail_domain, mail_server) # deploy web pages and info if we have them pkg_root = importlib.resources.files(__package__) diff --git a/scripts/generate-dns-zone.sh b/scripts/generate-dns-zone.sh index 0480ca3e..a5b9bd27 100755 --- a/scripts/generate-dns-zone.sh +++ b/scripts/generate-dns-zone.sh @@ -1,5 +1,6 @@ #!/bin/sh : ${CHATMAIL_DOMAIN:=c1.testrun.org} +: ${CHATMAIL_SERVER:=$CHATMAIL_DOMAIN} : ${CHATMAIL_SSH:=$CHATMAIL_DOMAIN} set -e @@ -8,16 +9,22 @@ EMAIL="root@$CHATMAIL_DOMAIN" ACME_ACCOUNT_URL="$($SSH -- acmetool account-url)" cat <