For DANE on SMTP (RFC 7672), where does a receiving domain publish TLSA records, and why are DANE-EE(3) and DANE-TA(2) the usages to use?
answer
- one record set per MX host
- port and protocol labels first
- only means something when signed
- pin the key or pin the issuer
- the PKIX usages add nothing on port 25
basics
~20 sTLSA records sit at _25._tcp.<MX host> in a DNSSEC-signed zone. DANE-EE(3) pins the server's own key and skips name and expiry checks; DANE-TA(2) pins an issuing CA and keeps name checks. Port-25 records SHOULD NOT use PKIX-TA(0) or PKIX-EE(1).
solid answer
~50 sFor every MX host, the domain publishes TLSA records at `_25._tcp.<mx host>`, and they count only if the sender can validate them with DNSSEC; the MX records themselves must also be validated for DANE to authenticate delivery to the recipient domain. A secure, usable TLSA record means TLS is **mandatory and authenticated**: if authentication fails, the sender tries the next MX or defers, never falling back to cleartext. RFC 7672 recommends `3 1 1` (DANE-EE, public key, SHA-256): the sender checks only that the server's key matches,, with no name or expiry check. Its second choice is `2 0 1` (DANE-TA, full certificate, SHA-256), which pins an issuing CA; the sender then checks names against the MX host and the recipient domain, and the server must send that CA certificate in its chain. PKIX-TA(0) and PKIX-EE(1) SHOULD NOT be published for port 25: MTAs share no CA list, and the CA check adds nothing once DNSSEC is trusted.
code
dns · 5 linesexample.com. 3600 IN MX 10 mx1.example.com.
example.com. 3600 IN MX 20 mx2.example.com.
_25._tcp.mx1.example.com. 3600 IN TLSA 3 1 1 8f2a...c41d
_25._tcp.mx1.example.com. 3600 IN TLSA 3 1 1 1b7e...90aa
_25._tcp.mx2.example.com. 3600 IN TLSA 2 0 1 e3b0...b855go deeper
Remember that DANE publishes TLSA records at _25._tcp of each MX host and only works in a DNSSEC-signed zone.
Explain the four lookup outcomes and why a usable record makes TLS mandatory, and read a 3 1 1 and a 2 0 1 record.
Contrast name checking under DANE-EE and DANE-TA, explain why the PKIX usages are discouraged on port 25, and run a key rollover without deferring mail.
Judge whether a domain can sustain DNSSEC and TLSA operations, and where DANE's per-MX, downgrade-resistant model is worth that cost over MTA-STS.
## What DANE does for SMTP **DNS-Based Authentication of Named Entities (DANE)** for SMTP, RFC 7672 (October 2015), uses DNSSEC-signed **TLSA** records to do two things at once: tell a sending MTA that an MX host **supports TLS**, so that a missing STARTTLS offer is treated as an error rather than a reason to send in cleartext, and tell it **how to verify** that host's certificate without relying on public certificate authorities. The TLSA format comes from RFC 6698 (August 2012), with operational updates in RFC 7671. How zones are signed and validated belongs to the material on DNSSEC; what matters here is that DANE means nothing in an unsigned zone. ## Where the records live The **TLSA base domain** is the MX host name, not the recipient domain. For each MX host, the sender prefixes the port and protocol labels and queries `_25._tcp.<mx host>` for type TLSA. If the zone uses a CNAME for the TLSA name, the base domain does not change. Several conditions must hold together: - The MX RRset must be DNSSEC-validated ("secure") for DANE to authenticate delivery to the recipient domain; with insecure MX records an attacker could still redirect mail, although a sender may still use the provider's TLSA records. - The MX host's address records and its TLSA records must be secure too; a sender is told not to look for TLSA records when the host's address records are insecure. - Every MX host needs its own records. TLSA records do not change MX preference order, so a domain where only some MX hosts publish them gets uneven protection. ## What a sender does with the lookup result | TLSA lookup result | Sender behaviour under RFC 7672 | |---|---| | Secure, at least one usable record | TLS required and the server authenticated; on failure, next MX or delayed delivery | | Secure, but every record unusable | TLS required, authentication not required | | Insecure, or securely proven absent | Ordinary opportunistic TLS, cleartext allowed | | Lookup error, including a "bogus" answer | Next MX or delayed delivery, never cleartext | The last row matters operationally: a broken signature does not quietly downgrade delivery; it **stops** it until fixed. Postfix exposes this as the `dane` level (opportunistic DANE) and the `dane-only` level (mandatory DANE), and needs `smtp_dns_support_level = dnssec` and a validating resolver before it will use TLSA records at all. ## The four usages and why two are used | Usage | Name | What it pins | Port-25 guidance | |---|---|---|---| | 0 | PKIX-TA | A CA that must also be publicly trusted | SHOULD NOT publish | | 1 | PKIX-EE | The server certificate, also publicly validated | SHOULD NOT publish | | 2 | DANE-TA | An issuing CA named in DNS | Second choice, ideally `2 0 1` | | 3 | DANE-EE | The server's own certificate or key | Recommended, ideally `3 1 1` | RFC 7672 explains the PKIX usages away: MTAs have no common list of trusted CAs and no person to accept an unknown one, and anyone able to subvert DNSSEC could swap a PKIX record for a DANE one anyway. Senders MAY treat PKIX usages as unusable; Postfix supports only usages 2 and 3. ## Name checks: what each usage verifies - **DANE-EE(3)**: the sender MUST NOT check names, and the certificate's expiry date MUST be ignored; the binding lasts as long as the DNSSEC signature over the TLSA record. With a `3 1 1` record, any certificate carrying the pinned key works, even a self-signed one. - **DANE-TA(2)**: the sender MUST check names. The TLSA base domain (the MX host) is the primary reference identifier, and when the MX came from a secure lookup the recipient domain is accepted as well. The server MUST include the trust-anchor certificate in the chain it presents, even if it is a self-signed root. ## Rotating keys without breaking delivery 1. Publish a second TLSA record matching the **new** key or certificate alongside the current one. 2. Wait until caches can no longer hold the old TLSA RRset and its signatures, at least the TTL. 3. Switch the server to the new key. 4. Remove the record for the retired key. Swapping key and record in one step leaves senders holding the old record and failing authentication, which under DANE means deferred mail. With `3 1 1` records, renewing a certificate on the **same** key needs no DNS change at all.
- Why is DANE-EE(3) with selector SPKI(1) the usual recommendation over DANE-TA(2)?Because it has the fewest ways to fail. The sender matches only the server's public key, so names, intermediate certificates and expiry dates cannot break delivery, and a certificate renewed on the same key needs no DNS change. DANE-TA(2) suits a domain issuing certificates for many hosts from one CA, at the cost of name checks and sending the CA certificate in every handshake.
- A domain's DNSSEC signatures expire by mistake. What happens to DANE-protected inbound mail?Validating senders get a bogus answer, and RFC 7672 treats any lookup error as a reason to try the next MX or delay delivery, never to fall back to cleartext. Mail queues at those senders until the zone validates again, and bounces if the outage outlasts their retry limit. That is why signing operations and monitoring are part of any DANE commitment.
- A TLSA record protects mail even when the zone is not DNSSEC-signed
- With DANE-EE the certificate must still carry the MX host name
- The TLSA record belongs at _25._tcp of the recipient domain
- Replace the TLSA record and the server key at the same moment
- A DANE authentication failure falls back to cleartext delivery
- DANE-EE certificates stop working when their expiry date passes