mailcow-dockerized/data
Stephen Ritz e5d0ed8c4c [Web] use absolute RHS names in generated DNS zonefile
The DNS overview "Download" produces a $ORIGIN zonefile, but the
right-hand side of MX, CNAME and SRV records was emitted as a relative
name. A target such as mail.example.net is then read relative to the
origin and expands to mail.example.net.example.org., which is wrong.

The only prior attempt at making names absolute was
str_replace($domain, $domain . '.', ...), which appended a dot only to
targets that happened to contain the origin domain, so cross-domain
targets stayed relative. That same replace also corrupted any TXT value
containing the origin (e.g. a DMARC rua=mailto:x@example.org became
...@example.org.).

Absolutize the RHS per record type at export time only: MX and CNAME
targets, and the SRV target token, get a trailing dot; ports, the SRV
root target ".", IP addresses and TXT character strings are left as is.
The records used for the on-page DNS validation are untouched, so
matching against dns_get_record() output still works.

Fixes #6984

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 16:33:46 -07:00
..
assets Merge pull request #6223 from mailcow/ffdhe2048 2025-02-12 10:48:22 +01:00
conf [Postfix] change postscreen blacklist_action to denylist_action 2026-07-13 08:45:56 +02:00
Dockerfiles Merge pull request #7312 from mailcow/renovate/composer-composer-2.x 2026-07-13 09:40:58 +02:00
hooks [SOGo] Added hooks support for SOGo image (#4181) 2021-07-28 21:41:44 +02:00
web [Web] use absolute RHS names in generated DNS zonefile 2026-07-14 16:33:46 -07:00