A TLSA record tells every DANE-aware sender exactly which key your mail server must present, and if that record and the live certificate ever disagree, those senders stop delivering to you. DANE (DNS-Based Authentication of Named Entities) turns opportunistic SMTP encryption into authenticated, downgrade-resistant TLS, but it moves the trust decision into your DNS zone and makes key rotation a coordinated DNS and server change. This guide explains the TLSA record field by field, why "3 1 1" is the normal choice for SMTP, how senders behave when records are missing, unusable or broken, and how to roll keys without queuing a day of inbound mail. It is for email and DNS administrators running DNSSEC-signed zones.
Key takeaways
- DANE replaces "any certificate will do" with a pinned key. A secure TLSA RRset at
_25._tcp.<mx-host>obliges DANE-aware senders to use TLS and to authenticate your server against the record, with no fallback to cleartext. - Use 3 1 1 unless you have a reason not to. RFC 7672 recommends DANE-EE(3), SPKI(1), SHA2-256(1) first and DANE-TA(2), Cert(0), SHA2-256(1) second; PKIX-TA(0) and PKIX-EE(1) should not be published for SMTP.
- DNSSEC is a hard dependency, on both sides. Senders only honour TLSA records from DNSSEC-validated answers, and a bogus answer defers your mail rather than downgrading it.
- Rollover is where outages happen. Publish the next key's TLSA record at least two TTLs before the new certificate goes live, keep "current plus next" records, and change one thing at a time (RFC 7671 Section 8).
- Monitor from the outside. TLS-RPT (RFC 8460) reports with result types such as
tlsa-invalidanddnssec-invalidare the only way you see failures in other organisations' queues.
What DANE does
Port 25 relay uses STARTTLS opportunistically: senders usually accept any certificate, and if the STARTTLS offer is stripped the message goes in cleartext, so an attacker in the path (ATT&CK T1557 Adversary-in-the-Middle) can downgrade or intercept unnoticed. DANE publishes, in a DNSSEC-signed zone, which certificate or key the server will present. The signed answer cannot be forged or hidden, and the sender authenticates the server without relying on a public certificate authority.
The building blocks are four Standards Track RFCs, checked on 27 November 2026: RFC 6698 (August 2012) defines the TLSA record (RR type 52); RFC 7218 (April 2014) adds the field acronyms; RFC 7671 (October 2015) updates RFC 6698 with DANE-EE and DANE-TA semantics and rollover guidance; RFC 7672 (October 2015) defines DANE for SMTP.
Microsoft's documentation states that outbound SMTP DANE is enabled by default for all Exchange Online customers with no tenant opt-out, and that inbound DANE is opt-in per domain. Postfix has supported DANE in its SMTP client since version 2.11. A wrong record therefore hurts.
DANE does not replace SPF, DKIM or DMARC. See the SMTP Security, STARTTLS and MTA-STS Guide for the wider transport picture and the DMARC, SPF and DKIM Guide for sender authentication.
TLSA record anatomy
A TLSA record has four fields: certificate usage, selector, matching type and the certificate association data. In presentation format it looks like this:
_25._tcp.mx1.example.com. 3600 IN TLSA 3 1 1 <64 hex characters: SHA-256 of the server's SubjectPublicKeyInfo>
The owner name is the port, the transport and the host name the client connects to. For SMTP that is the MX host name, not the mail domain: mail for example.com delivered to mx1.example.com is checked against _25._tcp.mx1.example.com.
| Field | Value | RFC 7218 name | Meaning | Use for SMTP |
|---|---|---|---|---|
| Certificate usage | 0 | PKIX-TA | CA constraint: chain must also validate against public CAs | Do not publish (RFC 7672 Section 3.1.3) |
| Certificate usage | 1 | PKIX-EE | Service certificate constraint plus public CA validation | Do not publish |
| Certificate usage | 2 | DANE-TA | Trust anchor assertion: the named CA or intermediate is the trust anchor | Second choice |
| Certificate usage | 3 | DANE-EE | Domain-issued certificate: match the server's own certificate or key | First choice |
| Selector | 0 | Cert | Match the full certificate | With DANE-TA |
| Selector | 1 | SPKI | Match only the SubjectPublicKeyInfo (public key) | With DANE-EE |
| Matching type | 0 | Full | Exact data, no hash | Discouraged: large records, interoperability problems |
| Matching type | 1 | SHA2-256 | SHA-256 digest | Mandatory to implement; publish this |
| Matching type | 2 | SHA2-512 | SHA-512 digest | Optional extra; never publish SHA2-512 only |
Why 3 1 1 is the default practice
- No name or expiry checks: RFC 7671 Section 5.1 says a server matching a DANE-EE record must be considered authenticated even if no name in the certificate matches, and the certificate's expiry date is ignored. The TLSA RRset is the identity. Self-signed certificates work.
- Survives renewal if the key is kept: because the selector is SPKI, the record still matches after a certificate is renewed with the same key pair. Configuring the ACME client to reuse the key makes most renewals non-events.
When 2 0 1 makes sense
DANE-TA(2) with Cert(0) and SHA2-256(1) pins an issuing CA rather than the server key. It suits large estates where many MX hosts get certificates from one internal or public issuer and the CA changes far less often than server keys. Three conditions apply. The server must send the trust anchor certificate in its TLS handshake (RFC 7671 Section 5.2.2). Name checks do apply: RFC 7672 makes the TLSA base domain, the MX host name, the primary reference identifier, with the original next-hop domain also accepted for MX-derived records. And RFC 7671 Section 5.2.1 advises Cert(0) rather than SPKI(1) for DANE-TA, because pinning only the key would let a subordinate CA issue chains that escape the anchor's constraints.
To produce the 3 1 1 digest, hash the DER-encoded public key with SHA-256, for example openssl x509 -in cert.pem -noout -pubkey | openssl pkey -pubin -outform DER | openssl dgst -sha256, and check it against the key the server actually presents.
DANE for SMTP
RFC 7672 defines how a sending MTA uses TLSA records. Everything depends on the DNSSEC status of two lookups: the MX lookup for the recipient domain and the TLSA lookup for each MX host.
| Situation seen by the sender | Sender behaviour (RFC 7672) |
|---|---|
| MX lookup fails (bogus, indeterminate or error) | Delivery is delayed |
| MX answer is insecure (unsigned) | DANE cannot authenticate the delivery; the sender may use pre-DANE TLS and must not present it as secure |
| TLSA lookup for one MX host fails | That host is treated as unreachable and skipped; if no host is reachable, delivery is delayed |
| Secure TLSA RRset with at least one usable record | TLS and authentication are required; failure moves to the next MX or delays delivery |
| Secure TLSA RRset with only unusable records (for example only usage 0 or 1) | TLS is required but not authenticated |
| No TLSA record, or insecure TLSA answer | Falls back to opportunistic pre-DANE TLS |
- Both zones must be signed: the recipient domain (for a secure MX answer) and the zone holding the MX host's address and TLSA records. Postfix, for example, does not look up TLSA records for MX hosts whose address records sit in an insecure zone. See the DNSSEC Deployment Guide.
- Any secure TLSA record is a commitment to TLS: RFC 7672 Section 9.2 says servers that offer STARTTLS selectively, for example only after greylisting, must not publish TLSA records.
- SNI: clients must send SNI with the TLSA base domain; servers may use it to choose a certificate but must not require it, and should present a matching fallback chain when SNI is missing.
MX preference still wins over TLS, so publish TLSA records for every MX host, including backup MX and third-party filtering services.
Sending side configuration
Outbound, a sender needs a DNSSEC-validating resolver and an MTA that honours TLSA records. In Postfix, DANE is off unless smtp_dns_support_level = dnssec is set; smtp_tls_security_level = dane authenticates where usable records exist, and dane-only defers delivery to servers without them. Postfix relies on the system resolver and recommends a local validating resolver on loopback.
Key rollover without outages
The most common DANE outage is a renewal that silently changes the key while the TLSA record still pins the old one. RFC 7671 Section 8 sets the rule that prevents this: a future or past record must never be the only record for a given usage, selector and matching type, and each published combination must on its own match the chain the server presents.
Rollover procedure for 3 1 1
- Generate the next key in advance. Create the new key pair (and certificate request) without deploying it. Compute its 3 1 1 digest.
- Publish current plus next. Add a second TLSA record for the new key alongside the existing one at each
_25._tcp.<mx-host>name. Confirm both records validate as DNSSEC-secure from an external resolver. - Wait at least two TTLs. RFC 7671 Section 8 asks for the new record to be published at least two TTLs before the new chain is deployed, so every cached copy of the RRset includes the new key. Allow for signing and zone transfer delays too.
- Deploy the new key and certificate on each MX host, one host at a time if you have several. Test that the presented key matches a published record using an external DANE validation tool.
- Check reports in TLS-RPT and inbound logs for a full reporting day.
- Remove the old record once nothing presents the old key. Keep a "next" record published for the following rotation if your process allows it.
- One change at a time: RFC 7671 Section 8.4 warns against combining a key change with a change of TLSA parameters. To move from 2 0 1 to 3 1 1, first publish 3 1 1 for the existing chain, wait, then change keys (Section 8.2).
- Adding SHA2-512: publish the new digest for every key in use, because clients use only the strongest digest present for each usage and selector (Section 9). A key matched only by the weaker digest will fail for clients that prefer SHA2-512.
- DANE-TA rollover: publish the new trust anchor's record before using it to issue server certificates (RFC 7672 Section 4).
- Compromise: revocation is done by removing the compromised key's TLSA record, not by CRL or OCSP. That is why RFC 7671 Section 13 asks for TTLs short enough to limit disruption from unplanned changes, and short DNSSEC signature lifetimes, since a replayed signed record stays valid until its signature expires.
Automating it safely
The renewal pipeline has to own both halves: reuse the key so the 3 1 1 digest does not change, or publish the next TLSA record, wait two TTLs, then install the new key. The DNS API credential that publishes TLSA records is a high-value non-human identity, since whoever holds it can pin your mail to their own key or break inbound delivery: scope it to the TLSA names, vault it and rotate it. See the Certificate Expiry Outages and 47-Day TLS Certificates Guide.
Rolling back
If inbound delivery fails, publish a TLSA record matching the key in service rather than deleting DNSSEC; removing all TLSA records only helps after caches expire, and RFC 7672 treats disabling DANE as a last resort. On Exchange Online, inbound DANE is reversed with Disable-SmtpDaneInbound.
DANE and MTA-STS
MTA-STS (RFC 8461) solves the same downgrade problem with an HTTPS-hosted policy and public CA certificates instead of DNSSEC. The two are designed to coexist, and RFC 8461 Section 2 states that senders must not allow MTA-STS policy validation to override a failing DANE validation. In practice, a broken TLSA record still blocks delivery from DANE-aware senders even if your MTA-STS policy is perfect.
| Question | DANE | MTA-STS |
|---|---|---|
| Trust root | DNSSEC chain to the DNS root | Public Web PKI certificate authorities |
| Prerequisites | Signed recipient zone and MX host zone; validating resolvers at senders | HTTPS host at mta-sts.<domain> with a publicly trusted certificate; MX certificates from public CAs |
| First contact | Protected from the first message | Trust on first use: policy is cached after the first fetch |
| Main operational risk | TLSA and key mismatch on rollover; DNSSEC failures | Policy host or certificate failures; stale max_age caches |
| Failure reporting | TLS-RPT policy type tlsa | TLS-RPT policy type sts |
Decision guidance: if your DNS provider supports DNSSEC well and your MX hosts are under your control, publish DANE and MTA-STS together, which covers senders that support only one. If you rely on a hosted mail or filtering service, publish DANE only where the provider supports inbound DANE for your domain, because the TLSA records must match keys the provider controls and rotates. Smaller teams without DNSSEC experience can start with MTA-STS and TLS-RPT, then add DANE once DNSSEC is stable.
Monitoring and measurement
RFC 7672 Section 6 tells administrators to monitor logs and queues, because mandatory DANE delays mail rather than sending it insecurely. Build monitoring on three layers:
- TLS-RPT: publish
_smtp._tls.<domain> TXT "v=TLSRPTv1; rua=mailto:tlsrpt@<domain>"before enabling DANE. Senders post daily JSON reports (normally gzip-compressed) covering a UTC day. The DANE-relevant result types aretlsa-invalid,dnssec-invalid,dane-required,starttls-not-supportedandcertificate-expired. - Synthetic checks: at least daily, and after every certificate or DNS change, compare the key each MX host presents on port 25 with the published TLSA records from an external validating resolver. Alert on any MX host with no matching record, and on RRSIG expiry within your re-signing window.
- Outbound logs: on your own senders, log TLS verification results per destination. Exchange Online returns NDR codes 4/5.7.321 (starttls-not-supported), 4/5.7.322 (certificate-expired), 4/5.7.323 (tlsa-invalid) and 4/5.7.324 (dnssec-invalid); Microsoft notes some DNSSEC failures surface as 4/5.4.312.
Metrics
- TLSA coverage: percentage of MX hosts (including backups and filtering services) with a secure, matching TLSA record. Target 100%.
- Key match rate: share of synthetic checks where the presented key matches a published record. Anything below 100% is an incident.
- TLS-RPT failure rate: failed sessions as a share of total sessions reported, split by result type; investigate any non-zero
tlsa-invalidordnssec-invalidcount. - Rollover lead time: hours between publishing the next TLSA record and deploying the key, compared with two times the TLSA TTL.
Framework mapping
| Framework | Reference | How DANE contributes |
|---|---|---|
| NIST CSF 2.0 | PR.DS-02 | Protects data in transit between mail servers against interception and downgrade |
| NIST SP 800-53 Rev 5 | SC-8 Transmission Confidentiality and Integrity | Authenticated TLS on server-to-server mail |
| NIST SP 800-53 Rev 5 | SC-20 and SC-21 Secure Name/Address Resolution | Signed authoritative data and validating resolvers that DANE depends on |
| NIST SP 800-53 Rev 5 | SC-17 Public Key Infrastructure Certificates | Managing the keys and certificates pinned by TLSA records |
| MITRE ATT&CK v20 | T1557 Adversary-in-the-Middle; T1040 Network Sniffing | Techniques that opportunistic SMTP TLS does not stop and DANE mitigates |
Common failure patterns
- Renewal changes the key, TLSA does not follow: the classic outage. Automated renewal generates a new key by default and DANE-aware senders start deferring. Reuse keys or make the renewal pipeline publish the next record first.
- Next key published too late: the new record goes up minutes before the swap while resolvers still cache the old RRset.
- Backup MX or filtering service forgotten: TLSA records on the primary MX only, or records that pin your key while a third-party gateway presents its own.
- DNSSEC breaks underneath DANE: expired RRSIGs or a DS mismatch after a registrar or DNS provider change turn into
dnssec-invalidand delayed mail for every DANE-aware sender. See DNSSEC Validation Failures. - Publishing usage 0 or 1: senders treat PKIX-TA and PKIX-EE as unusable for SMTP, so the domain gets mandatory but unauthenticated TLS and a false sense of protection.
Practitioner checklist
- Confirm the recipient domain and every MX host zone are DNSSEC-signed and validate from external resolvers.
- Publish TLS-RPT and collect at least a week of reports before adding TLSA records.
- Publish 3 1 1 records (or 2 0 1 with the anchor in the chain) for every MX host, including backups and gateways.
- Verify each record against the key the host actually presents on port 25, with SNI and without.
- Configure certificate automation to reuse keys or to publish the next TLSA record before installing a new key.
- Scope, vault and rotate the DNS API credential that can change TLSA records.
- Run daily synthetic DANE checks and alert on mismatches and RRSIG expiry.
- Write and test a rollback runbook: republish a record for the live key first; disable inbound DANE only as a last resort.
Standards and references
- IETF: RFC 6698 The DNS-Based Authentication of Named Entities (DANE) Transport Layer Security (TLS) Protocol: TLSA
- IETF: RFC 7671 The DANE Protocol: Updates and Operational Guidance
- IETF: RFC 7672 SMTP Security via Opportunistic DANE TLS
- IETF: RFC 7218 Adding Acronyms to Simplify Conversations about DANE
- IETF: RFC 8460 SMTP TLS Reporting
- IETF: RFC 8461 SMTP MTA Strict Transport Security (MTA-STS)
- Postfix: TLS Support (DANE security levels)
- Microsoft Learn: How SMTP DNS-based Authentication of Named Entities (DANE) works
Related NHI Mgmt Group resources: SMTP Security, STARTTLS and MTA-STS Guide · DNSSEC Deployment Guide · DNSSEC Validation Failures · Certificate Expiry Outages and 47-Day TLS Certificates Guide · Email Authentication Checklist