Issue Description
I was trying to send mails to domains protected by MS Exchange. For some, it works, but for others, it does not.
After investigating the issue, I found a potential culprit in the Server behaviour: if the recipient’s mailserver has a valid DNSSEC configuration, Stalwart expects it to have a TLSA record.
Expected Behavior
If no TLSA record is found and the DANE strategy is set to ‘Optional’, the mail should be sent.
Actual Behavior
INFO Error fetching TLSA record (dane.tlsa-record-fetch-error)
queueName = "remote"
from = "[email protected]"
to = ["[email protected]"]
domain = "targetserver.tld"
hostname = "targetserver-tld.mail.protection.outlook.com"
causedBy = DNS error (mail-auth.dns-error)
details = "DNS error: error response: Server Failure"
strict = false
elapsed = 177ms
Reproduction Steps
- Use the default TLS strategies on the sender’s mailserver
- Configure DNS entries on the recipient’s server so that DNSSEC passes (https://powerdmarc.com/dnssec-checker/), but TLSA does not (https://powerdmarc.com/dane-record-checker/)
Relevant Log Output
When the recipient’s server does not have a valid DNSSEC configuration, everything works:
INFO New delivery attempt for domain (delivery.domain-delivery-start)
INFO TLS-RPT record not found (tls-rpt.record-not-found)
INFO MTA-STS policy not found (mta-sts.policy-not-found)
+ INFO TLSA record not DNSSEC signed (dane.tlsa-record-not-dnssec-signed)
INFO Connecting to remote server (delivery.connect)
INFO SMTP STARTTLS command (delivery.start-tls)
INFO Message delivered (delivery.delivered)
INFO DSN success notification (delivery.dsn-success)
INFO Delivery completed (delivery.completed)
INFO Delivery attempt ended (delivery.attempt-end)
If the server has DNSSEC but not TLSA:
INFO New delivery attempt for domain (delivery.domain-delivery-start)
INFO TLS-RPT record not found (tls-rpt.record-not-found)
INFO MTA-STS policy not found (mta-sts.policy-not-found)
- INFO Error fetching TLSA record (dane.tlsa-record-fetch-error)
INFO Message rescheduled for delivery (queue.rescheduled)
INFO Delivery attempt ended (delivery.attempt-end)
Stalwart Version
v0.16.x
Installation Method
Docker
Database Backend
FoundationDB
Blob Storage
S3-compatible
Search Engine
Elasticsearch
Directory Backend
OIDC
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
