Blog · · The exx.sh team
MTA-STS and DANE: when we refuse to send without verified TLS
Email encryption between servers is optional by default and easy to strip. Two standards let a domain demand better, and exx.sh follows both on every delivery.
When one mail server hands a message to another, encryption is opportunistic. The sender asks “do you support TLS?”, the receiver says yes, and they switch. If anything in between removes that offer, or presents a certificate for the wrong server, a classic sender shrugs and carries on in plain text. Nobody notices, because nothing breaks.
Two standards let a domain say “do not do that to my mail”: MTA-STS and DANE. exx.sh checks for both before every delivery and records which one applied.
MTA-STS: a policy over HTTPS
A domain with MTA-STS (RFC 8461) publishes a small TXT record at _mta-sts.<domain> and a
policy file at https://mta-sts.<domain>/.well-known/mta-sts.txt. The policy lists the MX
hosts that are allowed to receive its mail, and a mode.
In enforce mode, we only deliver to an MX host that matches the policy, only over TLS, and
only if the server’s certificate is valid for that host name. If no listed host is
reachable that way, the message waits and we try again; it is never sent in plain text. In
testing mode, we deliver as we would without a policy.
The policy is cached for as long as the domain asks (its max_age). A new id in the TXT
record makes us fetch it again, and a domain that briefly loses its TXT record keeps its
cached policy until it expires, as the standard requires.
DANE: the certificate in signed DNS
DANE (RFC 7672) moves the trust into DNS. A domain signs its zone with DNSSEC and publishes
TLSA records at _25._tcp.<mx host> saying which certificate, or which certificate
authority, its mail server uses. When the MX answer is DNSSEC-signed and those records are
usable, the server’s certificate must match them. There is no fallback: a failed match ends
the attempt, and a TLSA lookup that fails or cannot be validated skips that host rather than
sending without authentication.
Strongest wins
A domain can publish both, or neither. For each MX host, we apply the strongest policy available:
| What the domain publishes | What we require |
|---|---|
| A DNSSEC-signed MX with usable TLSA records | DANE: TLS, and the certificate must match the records |
MTA-STS in enforce mode |
A listed MX host, TLS, and a certificate valid for its name |
| A signed MX with TLSA records we cannot use | TLS, though the certificate cannot be authenticated |
Nothing, or MTA-STS in testing |
TLS when the server offers it; plain text when it does not, or when the handshake fails |
DANE beats MTA-STS when both are present, as RFC 8461 recommends, and the MX names in the MTA-STS policy are still checked.
You can see which one applied
Every delivery attempt records the policy that applied, the TLS version and cipher, and whether the certificate was verified. It is in the attempt’s SMTP transcript, in the dashboard and through the API. If a recipient’s domain asks for verified TLS and its server cannot provide it, the attempt says so in plain words instead of quietly sending in the clear.
Sending through exx.sh needs no setup for any of this. If you also receive mail on your domain, publishing MTA-STS or DANE for it protects the mail other senders deliver to you.