How do you verify DANE/TLSA for a mail server?
DANE (DNS-Based Authentication of Named Entities) uses a DNSSEC-signed TLSA record, defined in RFC 6698, to publish exactly which TLS certificate or public key a server should present, so a connecting mail server can detect a forged or substituted certificate instead of trusting whichever certificate authority issued the one it receives; RFC 7672 defines how SMTP servers use this specifically to upgrade opportunistic STARTTLS into something an attacker can't silently downgrade.
By AdminKit team, Netbase JSC · Updated November 1, 2026
What a TLSA record actually pins
A TLSA record, defined in RFC 6698, lets a domain publish — in DNS — exactly which certificate or public key a given server is supposed to present, instead of leaving trust entirely up to whichever certificate authority issued the one a client happens to receive. For mail specifically, RFC 7672 defines how a sending SMTP server uses this to upgrade opportunistic STARTTLS into something an attacker on the network path can’t silently strip or downgrade — see does your mail server actually enforce STARTTLS? for why opportunistic STARTTLS needs a mechanism like this at all.
The record name itself encodes the service it protects: _port._protocol.hostname, so a TLSA record for SMTP on the standard port looks like _25._tcp.mail.example.com. That naming convention is why a TLSA record is specific to one service and port on a host, not a blanket statement about every service the hostname runs.
The four fields
A TLSA record’s data has four parts, read in order:
- Certificate Usage — which trust model applies:
0(PKIX-TA) and1(PKIX-EE) still require the certificate to chain to a public CA, just pinning which CA or which exact certificate within that chain;2(DANE-TA) and3(DANE-EE) don’t require a public CA at all, pinning a custom trust anchor or the end-entity certificate directly. RFC 7671’s operational guidance recommends3(DANE-EE) for new deployments — pin the actual server certificate, independent of any CA. - Selector — whether the match is against
0(the full certificate) or1(only its SubjectPublicKeyInfo, the public key and its algorithm). Selector1is generally preferred because it survives a certificate renewal that reuses the same key pair, which0wouldn’t. - Matching Type —
0(the full data, rarely used),1(a SHA-256 hash), or2(a SHA-512 hash) of whatever the selector pointed at. - Certificate Association Data — the actual hash value to compare against.
RFC 7671’s recommended combination for most new deployments is usage 3, selector 1, matching type 1 — pin the certificate’s public key, by SHA-256, directly, with no CA dependency at all.
Why it’s worthless without DNSSEC
A TLSA record is only as trustworthy as the DNS answer carrying it. If an attacker can intercept or spoof DNS responses — the same capability needed to redirect mail delivery in the first place — they could forge a matching fake TLSA record alongside a forged certificate, defeating the entire mechanism. This is why RFC 7671 requires DNSSEC to validate successfully for a TLSA record to count at all; a client that can’t validate the signature chain, or finds no signature, is required to ignore the record and fall back to ordinary opportunistic TLS rather than trust an unverifiable pin. See DNSSEC: what it actually protects for what that validation chain actually covers and the most common ways it breaks.
Checking one today
- Query the TLSA record. AdminKit’s live DNS lookup tool doesn’t resolve the TLSA type yet — it currently covers A, AAAA, MX, TXT, NS, CAA, PTR, SOA and CNAME — so check it directly with a command-line resolver:
dig _25._tcp.mail.example.com TLSA. An empty answer means no TLSA record is published for that service and port, which is the common case; DANE adoption on the receiving side of SMTP is still far from universal. - Confirm the zone is DNSSEC-signed. A TLSA record published in an unsigned zone provides no real protection, for the reason above — see DNSSEC: what it actually protects for how to tell whether a zone is actually signed and validating, not just that a record happens to exist.
- Confirm the pinned certificate matches what the server actually presents. Run AdminKit’s live SSL/TLS check against the mail host to see the certificate it serves in a real handshake — see how to read a TLS/SSL certificate check result for the fields it reports — then compare that certificate’s public key hash by hand against the TLSA record’s Certificate Association Data. A mismatch means either the TLSA record is stale after a certificate renewal, or something more concerning is serving a different certificate than the domain published.
DANE and MTA-STS aren’t competitors
MTA-STS (RFC 8461) protects against the same STARTTLS-stripping downgrade using a web-hosted policy file instead of a DNSSEC-signed DNS record, which makes it easier to deploy but dependent on separate web hosting and its own CA-issued certificate. DANE needs no web policy but only works at all once a zone is DNSSEC-signed — a prerequisite plenty of domains still haven’t met. Running both means a sending server that supports either mechanism gets downgrade protection; neither one alone covers every sending server on the internet, since support for each is still growing independently.
This guide is general information, not a security audit of your specific network — see our disclaimer for what AdminKit's guidance does and does not commit to.
Frequently asked questions
What problem does DANE/TLSA solve that a normal CA-issued certificate doesn't?
Ordinary TLS trusts any certificate authority in the client's trust store to vouch for a server's certificate — if any trusted CA is tricked or compromised into mis-issuing a certificate for a domain, a client has no DNS-level way to notice. A TLSA record lets the domain itself publish, in DNS, exactly which certificate or key it actually uses, so a validating client can confirm the certificate presented in the handshake matches what the domain published, independent of which CA (if any) issued it.
What do the four fields in a TLSA record mean?
RFC 6698 defines four fields: Certificate Usage (0=PKIX-TA, 1=PKIX-EE, 2=DANE-TA, 3=DANE-EE — which trust model applies), Selector (0=match the full certificate, 1=match only its SubjectPublicKeyInfo), Matching Type (0=full data, 1=SHA-256 hash, 2=SHA-512 hash), and the Certificate Association Data itself (the actual hash or data to match). RFC 7671's operational guidance recommends usage 3 (DANE-EE, pinning the end-entity certificate directly) with selector 1 and matching type 1 as the combination most deployments should use for new records.
Why does a TLSA record require DNSSEC specifically?
Because a TLSA record is only trustworthy if its own origin can be verified. Without DNSSEC signing the zone, an attacker who can intercept or spoof DNS responses could forge both the TLS certificate and a matching fake TLSA record at the same time, defeating the entire point. RFC 7671 requires a validating client to treat an unsigned or DNSSEC-validation-failing TLSA record as if it doesn't exist at all, falling back to ordinary opportunistic STARTTLS rather than trusting an unverifiable pin.
Can AdminKit check my mail server's TLSA record directly?
Not the TLSA record lookup itself yet — AdminKit's live DNS lookup tool resolves A, AAAA, MX, TXT, NS, CAA, PTR, SOA and CNAME, and TLSA isn't in that list yet, so a TLSA query needs a command-line resolver such as `dig _25._tcp.mail.example.com TLSA` in the meantime. AdminKit's live SSL/TLS check tool does help with the other half of verification: it completes a real handshake and reports the certificate a mail server actually presents, which you can compare by hand against what a TLSA record's hash claims to pin.
Do I need DANE if I already publish MTA-STS?
They solve the same downgrade problem with different mechanisms and aren't mutually exclusive. MTA-STS (RFC 8461) publishes a policy over HTTPS, discovered via a plain DNS TXT record, and doesn't require DNSSEC — easier to deploy but dependent on web hosting and a CA-issued certificate for the policy fetch itself. DANE/TLSA pins the mail server's own certificate directly via a DNSSEC-signed record and needs no separate web policy, but only works if the domain's zone is DNSSEC-signed. Many mail operators run both so a sending server enforcing either one gets the downgrade protection; see our guide on STARTTLS enforcement for how MTA-STS fits into the same picture.
Sources
- RFC 6698 — The DNS-Based Authentication of Named Entities (DANE) Transport Layer Security (TLS) Protocol: TLSA
- RFC 7671 — The DNS-Based Authentication of Named Entities (DANE) Protocol: Updates and Operational Guidance
- RFC 7672 — SMTP Security via Opportunistic DNS-Based Authentication of Named Entities (DANE) Transport Layer Security (TLS)
- IANA — DANE TLSA Certificate Usages, Selectors and Matching Types
Want AdminKit to watch this for you?
Free checks tell you the state today. Protective DNS and monitoring tell you when it changes.
Talk to an expert
Huy Nguyen (David), Founder & CEO, Netbase JSC
Ask whether this fix applies to your setup, or get a second pair of eyes on your DNS and mail records.