Issue Description
When automatic DNS management is enabled with tlsa: true, Stalwart should generate TLSA records for every hostname configured as a mail exchanger. All MX hostnames are covered by the certificate used by Stalwart.
Expected Behavior
Domain: mail.example.org
Mail exchangers:
10 node1.example.org
10 node2.example.org
Stalwart correctly generates:
mail.example.org. IN MX 10 node1.example.org.
mail.example.org. IN MX 10 node2.example.org.
The generated DNS zone to also contain SMTP DANE records such as:
_25._tcp.node1.example.org. IN TLSA 3 1 1
_25._tcp.node2.example.org. IN TLSA 3 1 1
and the corresponding trust-anchor TLSA records if applicable.
Actual Behavior
Stalwart generates the MX records correctly, but does not generate any _25._tcp TLSA records for the configured mail exchangers.
The generated zone contains:
mail.example.org. IN MX 10 node1.example.org.
mail.example.org. IN MX 10 node2.example.org.
and TLSA records for other Stalwart services:
_443._tcp.mail.example.org. IN TLSA 3 1 1
_993._tcp.mail.example.org. IN TLSA 3 1 1
_995._tcp.mail.example.org. IN TLSA 3 1 1
_465._tcp.mail.example.org. IN TLSA 3 1 1
but these records are missing:
_25._tcp.node1.example.org.
_25._tcp.node2.example.org.
This means automatic DNS management publishes MX hosts for inbound SMTP but does not publish the DANE records required for those same MX destinations.
Reproduction Steps
-
Configure the server default hostname/domain as:
mail.example.org -
Configure multiple mail exchangers:
node1.example.orgpriority 10node2.example.orgpriority 10
-
Configure automatic certificate management with a certificate containing:
- *.example.org
- *.mail.example.org
-
The wildcard certificate therefore covers both:
node1.example.orgnode2.example.org
-
Configure automatic DNS management:
{ "@type": "Automatic", "origin": "example.org", "publishRecords": { "autoConfig": true, "autoConfigLegacy": true, "autoDiscover": true, "caa": true, "dkim": true, "dmarc": true, "mtaSts": true, "mx": true, "spf": true, "srv": true, "tlsRpt": true, "tlsa": true } } -
Run/refresh the DNS Management task.
-
Fetch dnsZoneFile using x:Domain/get.
-
Observe that MX records are generated:
mail.example.org. IN MX 10 node1.example.org. mail.example.org. IN MX 10 node2.example.org.but no SMTP TLSA records are generated for either MX hostname.
Stalwart Version
v0.16.x
Installation Method
Docker
Database Backend
PostgreSQL
Blob Storage
S3-compatible
Search Engine
PostgreSQL
Directory Backend
Internal
I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.
on
I have searched this support forum (open and closed topics) and confirm this is not a duplicate.
on
I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.
on