From 609d277979f4bc47e22f91643644f786d6a2a3fe Mon Sep 17 00:00:00 2001 From: Keonik1 Date: Wed, 8 Oct 2025 10:24:44 +0200 Subject: [PATCH 1/2] cmdeploy: cmdeploy run option to skip DNS checks --- CHANGELOG.md | 3 +++ cmdeploy/src/cmdeploy/cmdeploy.py | 13 ++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ea095930..382bbb1ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,9 @@ - Allow ports 143 and 993 to be used by `dovecot` process ([#639](https://github.com/chatmail/relay/pull/639)) +- Add `--skip-dns-check` argument to `cmdeploy run` command, which disables DNS record checking before installation. + ([#661](https://github.com/chatmail/relay/pull/661)) + ## 1.7.0 2025-09-11 - Make www upload path configurable diff --git a/cmdeploy/src/cmdeploy/cmdeploy.py b/cmdeploy/src/cmdeploy/cmdeploy.py index 145c4bf6e..180296a90 100644 --- a/cmdeploy/src/cmdeploy/cmdeploy.py +++ b/cmdeploy/src/cmdeploy/cmdeploy.py @@ -63,6 +63,12 @@ def run_cmd_options(parser): dest="ssh_host", help="specify an SSH host to deploy to; uses mail_domain from chatmail.ini by default", ) + parser.add_argument( + "--skip-dns-check", + dest="dns_check_disabled", + action="store_true", + help="disable checks nslookup for dns", + ) def run_cmd(args, out): @@ -70,9 +76,10 @@ def run_cmd(args, out): sshexec = args.get_sshexec() require_iroh = args.config.enable_iroh_relay - remote_data = dns.get_initial_remote_data(sshexec, args.config.mail_domain) - if not dns.check_initial_remote_data(remote_data, print=out.red): - return 1 + if not args.dns_check_disabled: + remote_data = dns.get_initial_remote_data(sshexec, args.config.mail_domain) + if not dns.check_initial_remote_data(remote_data, print=out.red): + return 1 env = os.environ.copy() env["CHATMAIL_INI"] = args.inipath From 7c54b0cf9dabb746e01225a68dfc82fe24dd16a8 Mon Sep 17 00:00:00 2001 From: missytake Date: Wed, 8 Oct 2025 10:29:07 +0200 Subject: [PATCH 2/2] ci: skip DNS checks during cmdeploy run --- .github/workflows/test-and-deploy-ipv4only.yaml | 2 +- .github/workflows/test-and-deploy.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-and-deploy-ipv4only.yaml b/.github/workflows/test-and-deploy-ipv4only.yaml index 3871f73b6..a699f5e5e 100644 --- a/.github/workflows/test-and-deploy-ipv4only.yaml +++ b/.github/workflows/test-and-deploy-ipv4only.yaml @@ -77,7 +77,7 @@ jobs: cmdeploy init staging-ipv4.testrun.org sed -i 's#disable_ipv6 = False#disable_ipv6 = True#' chatmail.ini - - run: cmdeploy run + - run: cmdeploy run --verbose --skip-dns-check - name: set DNS entries run: | diff --git a/.github/workflows/test-and-deploy.yaml b/.github/workflows/test-and-deploy.yaml index c78923e47..5fe5db1e9 100644 --- a/.github/workflows/test-and-deploy.yaml +++ b/.github/workflows/test-and-deploy.yaml @@ -75,7 +75,7 @@ jobs: - run: cmdeploy init staging2.testrun.org - - run: cmdeploy run --verbose + - run: cmdeploy run --verbose --skip-dns-check - name: set DNS entries run: |