mailcow/data/web/inc/ajax
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
..
container_ctrl.php [Web] secure container_ctrl.php 2024-04-04 16:30:35 +02:00
destroy_tfa_auth.php [Web] add verify selected tfa 2022-03-14 10:31:51 +01:00
dns_diagnostics.php [Web] use absolute RHS names in generated DNS zonefile 2026-07-14 16:33:46 -07:00
qitem_details.php fix encoding failures of parsed text_plain mail 2022-10-26 12:33:22 +02:00
qr_gen.php [Web] Feature (beta): Add WebAuthn support for administrators and domain administrators 2020-11-15 19:32:37 +01:00
show_rspamd_global_filters.php [Rspamd] Fix map permissions for www 2019-10-29 08:39:57 +01:00
sieve_validation.php Updated to $_REQUEST. 2024-12-11 10:03:47 +08:00
syncjob_logs.php [Web] Feature (beta): Add WebAuthn support for administrators and domain administrators 2020-11-15 19:32:37 +01:00
transport_check.php [Web] Fix transport check for IPv6 addresses, thanks to marekschneider 2021-05-20 11:35:01 +02:00