DANE for SMTP (RFC 7672)
DNSSEC-authenticated TLS for SMTP — TLSA record placement and parameters, the sending-MTA validation algorithm, failure handling, and how DANE compares to MTA-STS.
Foundational7 min read
Who it is for ESP operators, Senders
Applies to senders on any platform
ContentsOn this page — 6 sections
If your mail servers sit in DNSSEC-signed zones, you can tell every sending server exactly which TLS certificate or key your MX hosts must present, and stop attackers from stripping STARTTLS. DNS-Based Authentication of Named Entities (DANE), applied to SMTP in RFC 7672, does this with records published in DNSSEC-signed DNS.
The secure existence of a TLSA record is enough on its own to tell sending mail transfer agents (MTAs) that TLS is available and mandatory for that server, which defeats STARTTLS stripping. The record data then authenticates the server without relying on public certificate authorities (CAs).
DANE solves the same problem of downgrade and impersonation as MTA-STS, but it anchors trust in DNSSEC instead of the Web PKI combined with trust on first use. The two can coexist; see the comparison at the end.
Prerequisite: DNSSEC
Everything depends on the DNSSEC validation status. RFC 7672 uses four states:
| State | Meaning | Sender treatment |
|---|---|---|
secure |
Cryptographically validated | Usable for DANE |
insecure |
Zone not signed with DNSSEC | No DANE; fall back to opportunistic TLS as it worked before DANE |
bogus |
Validation failed | Treated as a lookup error |
indeterminate |
Validation status cannot be determined | Treated as a lookup error |
A hard rule: if any DNS query used to locate TLSA records fails (bogus, indeterminate, timeout, malformed reply, SERVFAIL, and so on), the SMTP client MUST treat that server as unreachable and MUST NOT deliver through it. Tampering with DNS therefore causes a deferral, not a silent downgrade.
To publish DANE, the zones that contain the MX hostnames, their address records and the TLSA records must all be signed with DNSSEC and must validate.
TLSA record placement
TLSA records live at a name derived from the MX host (not from the mail domain), prefixed with the port and the protocol:
_25._tcp.mx.example.com. IN TLSA 3 1 1 <sha256-digest>
For a non-standard SMTP port, put the port number in _<port>._tcp.
TLSA parameters for SMTP
A TLSA record has three parameter fields (certificate usage, selector and matching type), plus the association data. For SMTP, only two certificate usages apply:
| Usage | Name | SMTP applicability |
|---|---|---|
| 0 | PKIX-TA | Not applicable. An attacker who can defeat DNSSEC could replace the record anyway, so PKIX adds no security. MTAs also lack a canonical trust store of public CAs for opportunistic use |
| 1 | PKIX-EE | Not applicable (for the same reasons) |
| 2 | DANE-TA | Trust anchor mode: the record designates a CA (often the operator's own), and the server must include that trust anchor certificate in the certificate chain of its TLS handshake |
| 3 | DANE-EE | End-entity mode: the record matches the server's leaf certificate or key directly. Primary recommendation |
Recommended combinations of parameters:
| Combination | Reading | Notes |
|---|---|---|
3 1 1 (DANE-EE, SPKI, SHA2-256) |
SHA-256 digest of the server's public key | Primary recommendation. The record survives certificate renewal as long as the key does not change |
2 0 1 (DANE-TA, Cert, SHA2-256) |
SHA-256 digest of the trust anchor certificate | Secondary. The selector Cert(0) is preferred over SPKI(1) because it preserves the constraints of the trust anchor (path length, name constraints). Through a CNAME, many servers under the same CA can share one TLSA resource record set (RRset) |
Support for SHA2-256 is mandatory in all DANE implementations, so 1 (SHA2-256) as the matching type is safe everywhere.
Name checks and certificate lifetime
| DANE-EE(3) | DANE-TA(2) | |
|---|---|---|
| Certificate name check | MUST NOT be performed, because the TLSA match alone authenticates the server | Required: a reference identifier must match an RFC 6125 DNS-ID (or a CN-ID if there are no DNS-IDs). The reference identifiers are the TLSA base domain (primary), the original next-hop domain, and the domain after CNAME expansion if it is different. Wildcards are valid only as the entire first label |
| Certificate expiration | Ignored: validity comes from the lifetime of the DNSSEC signature on the TLSA record | Checked as part of chain validation |
SNI: the SMTP client MUST send Server Name Indication (SNI) containing the TLSA base domain. Servers must not require SNI from clients, and do not need to send SNI in their own hello if the default certificate matches the TLSA records.
Sending MTA algorithm
- MX resolution. Look up the MX records for the next-hop domain. If the MX RRset is
secure, continue for each MX host. If it isinsecure, opportunistic DANE falls back to regular TLS handling as before DANE, while a locally configured policy that makes DANE mandatory defers instead. The MTA is not required to prefer the MX host that offers more security; the normal order of MX preference applies. - Address resolution. Resolve the A and AAAA records for the MX host first, both to confirm that it is reachable and to learn the DNSSEC status of the chain of names. If the address records are
insecure, skip the TLSA lookups (this avoids lookup errors on unsigned zones). CNAME handling determines the candidate TLSA base domains: asecureCNAME chain gives two candidates (the fully expanded name first, then the original name), and aninsecureinitial CNAME leaves only the original name. - TLSA lookup. Query
_25._tcp.<candidate>for each candidate. The first candidate that returns asecureTLSA RRset becomes the TLSA base domain. Follow CNAMEs in TLSA responses only while the whole chain stayssecure. - Apply the outcome:
| TLSA lookup outcome | Sender obligation |
|---|---|
secure RRset with at least 1 usable record |
TLS is mandatory, and authentication through TLSA matching is required. If authentication fails, do not deliver through this server; try the next MX or defer |
secure non-empty RRset, but all records unusable (unknown parameters, and so on) |
TLS (encryption) is mandatory, but authentication is not required. If the TLS connection fails, move to the next server or defer |
insecure RRset, or authenticated denial of existence |
No DANE: fall back to opportunistic TLS as before DANE (cleartext is acceptable if STARTTLS is unavailable) |
Any lookup error (bogus, indeterminate, SERVFAIL, timeout) |
The server is unreachable; defer if no other servers remain |
Delivery failures under DANE are deferrals (transient), never a downgrade to cleartext. They can be reported through the TLS-RPT result types tlsa-invalid, dnssec-invalid and dane-required.
Operational guidance for publishers
When you rotate keys or certificates, always publish in advance:
- Publish two TLSA records: one that matches the current key or certificate, and one that matches the next.
- Wait at least the TTL of the TLSA records, so that caches expire.
- Switch the server to the new key or certificate.
- Remove the old TLSA record once it is no longer needed.
If you rotate the server key without publishing the new TLSA record in advance, strict senders defer all mail until DNS converges.
- With
3 1 1(an SPKI digest), routine certificate renewals that keep the same key need no change to the TLSA records. - DANE-TA(2) with CNAME centralization: point the
_25._tcpname of each server at a shared central TLSA RRset. The CA operator publishes digests of new trust anchors there before servers adopt new keys. If one server's key is compromised, replace its CNAME with a direct DANE-EE(3) record until its certificate expires. - No selective STARTTLS: if a server advertises STARTTLS only to some clients (for example, after probes in the style of greylisting), senders that support DANE, for which cleartext is forbidden, can never complete the expected first transaction. Operators that publish TLSA records MUST NOT run selective STARTTLS.
- Monitor the health of your own TLSA records and DNSSEC continuously. An expired DNSSEC signature makes your domain unreachable, not only unauthenticated, for senders that validate DANE.
DANE vs MTA-STS
| DANE (RFC 7672) | MTA-STS (RFC 8461) | |
|---|---|---|
| Trust anchor | DNSSEC | Web PKI (CA certificates) and HTTPS |
| Requires DNSSEC | Yes (signed MX, address and TLSA zones) | No |
| First-contact protection | Yes: secure denial of existence is itself authenticated | No: trust on first use, so protection begins once a policy is cached |
| Downgrade resistance | Strong (DNS tampering leads to deferral) | Weaker (an attacker can suppress discovery before the first cache) |
| Granularity | Per MX host and port | Per mail domain (MX name patterns) |
| Certificate model | Pinned key or certificate (DANE-EE), or private trust anchor (DANE-TA); no public CA needed | A CA-signed certificate with a matching subject alternative name (SAN) is required on every MX |
| Failure mode | Defer (temporary failure) | Defer under enforce; deliver and report under testing |
| Reporting | Through TLS-RPT (policy-type: tlsa) |
Through TLS-RPT (policy-type: sts) |
Precedence when both are published: RFC 8461 requires that senders implementing both MUST NOT let a passing MTA-STS policy override a failing DANE validation. DANE is the stronger mechanism, and MTA-STS extends coverage to senders and domains that cannot use DNSSEC. Publishing both is legitimate and increasingly common. A sender's daily results for each appear as separate policy entries in TLS-RPT reports.
Check your own record
The free check reads what your domain publishes in DNS.
In this topic
- MTA-STS (SMTP MTA Strict Transport Security, RFC 8461)
- SMTP TLS Reporting (TLS-RPT, RFC 8460)
- SMTP TLS in Practice (STARTTLS, Implicit TLS, REQUIRETLS, version floors)
- TLS for Mail: M3AAWG Baseline Recommendations (April 2026)