DANE for SMTP

DANE pins your mail servers' certificates in DNS with TLSA records, signed by DNSSEC. A sending server that supports DANE will only deliver over TLS to a server presenting a matching key. It needs DNSSEC on the MX hosts' zones, which is the main reason fewer domains use it than MTA-STS.

The record

For each MX host, publish a TLSA record at _25._tcp.<mx host>. The common choice is usage 3 (DANE-EE: the server's own key), selector 1 (the public key), matching type 1 (SHA-256):

TLSA record
_25._tcp.mail.example.com. TLSA 3 1 1 0c72ac70b745ac19998811b131d662c9ac69dbdbe7cb23e5b514b56664c5d3d6

The record belongs to the zone of the MX host, not your mail domain. If your MX is a provider's host, only the provider can publish it.

Rolling a key

  1. Publish a second TLSA record for the new key next to the old one.
  2. Wait at least twice the TLSA record's TTL.
  3. Install the new key on the server.
  4. Remove the old TLSA record.

Replacing the certificate with the same key needs no DNS change at all when you use selector 1, which is why 3 1 1 is the usual choice.

DANE or MTA-STS?

Both protect inbound mail from downgrade attacks. DANE is stronger (no trust in public CAs, no first-use gap) but needs DNSSEC end to end. MTA-STS needs only HTTPS. Publishing both is allowed; senders that support DANE use it first (RFC 8461 section 2).