From d2c98e9afc41469b8afc7bd7c4574ec6595acb2c 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 | 25 ++++++++++++------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/deploy-chatmail/src/deploy_chatmail/__init__.py b/deploy-chatmail/src/deploy_chatmail/__init__.py index 7158b449..a854693f 100644 --- a/deploy-chatmail/src/deploy_chatmail/__init__.py +++ b/deploy-chatmail/src/deploy_chatmail/__init__.py @@ -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) + nginx_need_restart = _configure_nginx(mail_domain, mail_server) mta_sts_need_restart = _install_mta_sts_daemon() # deploy web pages and info if we have them diff --git a/scripts/generate-dns-zone.sh b/scripts/generate-dns-zone.sh index 4e99621f..080d66d3 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 <