dns: say when the records don't name this install's mail host (#83) #86

Merged
jcoffey-dev merged 1 commits from fix/83-dns-zone-follows-names into main 2026-11-18 17:03:05 +00:00
Owner

Fixes #83.

The records come from the server and follow its own hostname, so rewriting dns.zone when install runs again wouldn't help: the server still has the old name until it's changed in the console. Instead dns checks whether the records name the install's mail host anywhere (MX, a service record's target, SPF; an MX at a relay is fine, because the service records still name the server):

  • the saved copy says it predates the rename, and how to refresh it;
  • a live read (--refresh) says the server still calls itself something else, and where to change that.

Checked in the lab (debian13) with the three fixes together: the new e2e/cases/rename.sh 25/25 (install on lab.test, rename to names on other.test, dns, certs, hostname change, dns --refresh), and the existing certs.sh 21/21 and move-server.sh 56/56. Locally: gofmt, go vet (amd64 and arm64), go test -count=1 ./.... govulncheck only flags this workstation's Go 1.27.3 standard library (GO-2026-6859); CI's Go 1.26.11 has the fix.

Fixes #83. The records come from the server and follow its own hostname, so rewriting `dns.zone` when `install` runs again wouldn't help: the server still has the old name until it's changed in the console. Instead `dns` checks whether the records name the install's mail host anywhere (MX, a service record's target, SPF; an MX at a relay is fine, because the service records still name the server): - the saved copy says it predates the rename, and how to refresh it; - a live read (`--refresh`) says the server still calls itself something else, and where to change that. Checked in the lab (debian13) with the three fixes together: the new `e2e/cases/rename.sh` 25/25 (install on lab.test, rename to names on other.test, `dns`, `certs`, hostname change, `dns --refresh`), and the existing `certs.sh` 21/21 and `move-server.sh` 56/56. Locally: gofmt, `go vet` (amd64 and arm64), `go test -count=1 ./...`. govulncheck only flags this workstation's Go 1.27.3 standard library (GO-2026-6859); CI's Go 1.26.11 has the fix.
jcoffey-dev added 1 commit 2026-11-18 17:00:07 +00:00
The records come from the server and follow its own hostname, so after a
rename the saved dns.zone keeps the old names, and so does --refresh
until the server's hostname is changed in the console. Rewriting the
file on a converge wouldn't help: the server still has the old name then.

dns now checks whether the records name the install's mail host
anywhere (MX, a service record's target, SPF; an MX at a relay is fine
because the service records still name the server). If not, the saved
copy says it predates the rename and how to refresh it, and a live read
says the server still calls itself something else and where to change
it.
jcoffey-dev self-assigned this 2026-11-18 17:00:28 +00:00
jcoffey-dev merged commit 3288dd8f12 into main 2026-11-18 17:03:05 +00:00
jcoffey-dev deleted branch fix/83-dns-zone-follows-names 2026-11-18 17:03:05 +00:00
Sign in to join this conversation.