Senderward

DNS changes that silently break email

Updated ยท Published

Mail rarely breaks on the day you set it up. It breaks months later, when someone changes DNS for another reason: a new tool, a cleanup, a move to another DNS provider or mail provider. There is often no error anyone sees. Messages go to spam, or are refused by receivers that enforce DMARC, and the first sign is a customer asking where their invoice went. These are the four changes behind most of it.

Each section links to Lookproof's page for the exact finding, which explains the error and the fix in detail. This guide is about how the change happens and how to catch it.

1. A new SPF include pushes you over the lookup limit

How it happens: someone adds include: for a new tool. SPF allows at most 10 terms that need a DNS lookup (include, a, mx, ptr, exists and redirect, counted through nested includes too). At 11, SPF returns a permanent error, and that is a fail for every service that relies on SPF, not only the new one.

Why nobody notices: the record looks fine, and the tool that was added often still passes DMARC on its own DKIM. The services that break are the old ones that only had SPF. The count can also go over without any change on your side, when a provider adds a lookup inside its own include.

Related ways the same edit breaks SPF:

Catch it: count lookups after every SPF change with Lookproof's SPF lookup counter, and remove includes for services you no longer use.

2. DKIM records deleted in a cleanup or a DNS move

How it happens: DKIM records are CNAMEs or TXT records with names like s1._domainkey.example.com. Nobody remembers what they are for, so they are removed in a cleanup of "old records". Or the domain moves to a new DNS provider and the import misses them, or splits a long TXT key in the wrong place.

What breaks: without the key, the receiver cannot verify the signature, and DKIM fails for every message from that service. If the service's SPF is not aligned with your domain (the usual case), DMARC fails too. With p=reject, its mail is refused.

Catch it: keep a list of your selectors and which service owns each. You find them in the s= tag of the DKIM-Signature header of mail from each service. A checker cannot list a domain's selectors from DNS, it can only try common names (no DKIM key under the common selectors), so check yours by name with Lookproof's DKIM check, before and after a DNS move.

3. An expired MTA-STS certificate

MTA-STS involves two kinds of certificate, and they fail differently.

The certificate on mta-sts.example.com, the web host that serves the policy file. It is often on a forgotten web server or a CNAME to a hosting service, outside the usual certificate renewal. When it expires, senders can no longer fetch the policy. Senders that already have the policy keep using it until max_age runs out. After that they deliver as if you had no MTA-STS at all. Mail still arrives, but the protection is gone, silently. Lookproof reports this as MTA-STS policy fetch failed.

The certificate on your MX hosts. With mode: enforce, senders must not deliver to an MX whose certificate is expired or does not match its name. Mail is then not delivered at all: it waits in the sender's queue and eventually bounces. Lookproof's MTA-STS check does not connect to your mail servers, so it cannot see this. Your TLS-RPT reports can: see TLS-RPT reports explained for certificate-expired and the other failure types, and publish a TLS-RPT record if you have none (no TLS-RPT record).

Catch it: put the mta-sts. host under the same automatic renewal as your other web certificates, and read TLS-RPT reports. With a hosted mail provider, the MX certificates are the provider's job; with your own mail server, they are yours.

4. A changed MX

How it happens: a move to a new mail provider, or a DNS cleanup that touches the MX records. The MX itself usually gets updated correctly. What does not get updated is everything around it:

Catch it: after the switch, send mail to the domain from an outside mailbox, and run a full check: MX, MTA-STS coverage, SPF and DKIM for the new provider.

How long a change takes: TTL, not propagation

A DNS change is not pushed out to anyone. Each record has a TTL, the number of seconds a resolver may keep its copy before asking again. Until that time has passed, some receivers use the old record and some the new one. With a TTL of 3600 that is up to an hour. With 86400 it is a day, during which a fix looks as if it did not work and a mistake looks as if it did no harm.

MTA-STS has a cache of its own on top of this: senders keep the policy file for max_age seconds, whatever the DNS TTL is.

Also worth checking after a DNS move

For the checklist to follow when a new tool starts sending, see Email authentication checklist when adding a new sending service.

Check your domain

Free email security check by Lookproof. Opens on lookproof.dev.

Senderward checks your domain's DMARC, SPF, DKIM, MX, MTA-STS and TLS-RPT every day and emails you, with the fix, when something gets worse. $7 per domain per month, 14 days free. See pricing

Sources