Initial impact: deferrals that never reach your logs
SERVFAIL. A sending MTA treats SERVFAIL on an MX lookup as a temporary failure. It defers the message and retries on its normal schedule. If the failure lasts longer than the sender's queue lifetime, the message bounces. On a Postfix sender, the deferral looks roughly like this:
TEXT
# Illustrative output format (Postfix on the sending side)
postfix/smtp[PID]: QUEUEID: to=<[email protected]>, relay=none, delay=120, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=example.com type=MX: Host not found, try again)try again tells you the resolver failed temporarily. It does not mean the domain is missing.
Investigation: ruling out the parts that are healthy
dig example.com MX from the hosting server or an online lookup tool and gets the correct answer. That seems to clear DNS. It does not, because the result depends on which resolver answered. Many server-local resolvers and lookup tools do not validate DNSSEC. Some return a cached answer from before the break. A plain lookup through a non-validating path only shows that the record exists, not that a validating resolver can trust it.
The question that moves things forward is: what does a validating resolver say about this MX record?
The discovery: a SERVFAIL that disappears with +cd
ad (authenticated data) flag appears in the response.
BASH
# Replace with a resolver you have confirmed validates DNSSEC
RESOLVER='192.0.2.53'
# Normal query: a validating resolver returns SERVFAIL if the chain is broken
dig example.com MX @$RESOLVER
# Same query with validation disabled (CD bit set)
dig example.com MX @$RESOLVER +cd
# Ask the validator to explain why validation fails
delv example.com MXstatus: SERVFAIL, and the +cd query returns NOERROR with your correct MX records. The data is fine, but the signatures do not verify. Newer versions of dig may also show an Extended DNS Error line that names the reason, if the resolver supports it. delv performs validation locally and reports where the chain breaks.
The chain of trust explains why a key rollover causes this. Your zone has a Key Signing Key (KSK) that signs the zone's DNSKEY set, and that set contains the Zone Signing Key (ZSK) that signs everything else, including the MX record. The parent zone, meaning the TLD, publishes a DS (Delegation Signer) record: a hash of your KSK, which you submit through your registrar. A validator starts from the root, trusts the TLD, uses the DS to identify your KSK, and works down from there. If the DS does not match any KSK your nameservers publish, the chain stops at your zone and every record under it becomes bogus. That includes the MX, A, and TXT records.
During a KSK rollover this mismatch usually happens in one of these ways:
- The new KSK was published and the old KSK was removed, but the DS at the registrar still points to the old key.
- The DS was updated before the new KSK had been published long enough for resolver caches to pick it up.
- The submitted DS was generated from the wrong key, or uses a digest or algorithm that does not match.
- The algorithm was changed without the required pre-publication stages.
BASH
# DS at the parent: the first field is the key tag
dig example.com DS +short
# DNSKEY set from your nameservers: flags 257 marks a KSK,
# and +multi prints each key's key id (key tag) in a comment
dig example.com DNSKEY +multi @$RESOLVER +cdTemporary mitigation: make the chain match again
- Republish the old KSK. If the DS still points to the old key and you still have that key material, put it back into the DNSKEY set and sign with it. This is usually the fastest fix because it only depends on your own DNSKEY TTL, not the parent.
- Update the DS at the registrar to match the new KSK. Use this when the old key is gone. Recovery then depends on how quickly the registry publishes the change and on the DS TTL at the parent, which the TLD sets and you cannot change.
- Remove the DS entirely. This makes the zone unsigned from the validator's point of view. It is a last resort. It also waits on parent propagation, and it removes DNSSEC protection until you sign again properly.
The architectural fix: treat a rollover as a timed procedure
- Automate DS updates where possible. Some registries accept CDS or CDNSKEY records, which let the parent pick up the new DS from your zone instead of relying on someone to paste it into a registrar panel. Support varies by TLD and registrar, so check with yours rather than assuming it is available.
- Make ownership explicit. If one team runs the signer and another holds the registrar login, the rollover plan must name who changes the DS and when. The same mismatch happens when a signed domain moves between DNS providers, which is covered in the article on SERVFAIL after moving a DNSSEC-signed domain to a new DNS provider.
- Monitor validation, not just reachability. A check that connects to port 25 or loads the homepage stays green throughout this whole incident. Add an external check that resolves the MX record through a validating resolver and alerts on
SERVFAIL, and use a chain visualizer such as DNSViz before and after each rollover step. Why uptime monitors miss authoritative DNS outages covers this blind spot in more detail.
+cd, before touching the mail server. A SERVFAIL that goes away with +cd means the chain of trust is broken. The fix belongs at the DS record and the DNSKEY set, not in Exim or Postfix.