The effect DNS TTLs have on DKIM and SPF email authentication

Posted by lolklolk@reddit | sysadmin | View on Reddit | 12 comments

If you're still on the fence about DNS TTLs and how it can affect DKIM or SPF evaluation and email delivery, here's why you shouldn't be.

See this timeline starting with extremely low TTLs on DKIM CNAME records in DNS, and the effect it has on receiver authentication validation.

In one graph, this shows the timeline for all DMARC reports not from Microsoft, from which we saw a very positive effect from increasing TTLs on DKIM CNAMEs, and their respective targets. The DKIM failures are almost negligible levels now with all receivers.

In the second, with Microsoft OLC and M365, the effect is not nearly as obvious, as they have a bug currently with how Windows DNS (which the Defender antispam and Outlook consumer services use) evaluates DKIM (and also SPF).

So, in general, you should have your DKIM/SPF records at least at 1 hour. If they don't change often, you can go even higher, to 6 hours, or even 24 hours. The non-Microsoft 24-hour TTL results from that timeline speaks for itself in terms of temperror reduction.

If you're curious about total volume in terms of numbers, this is based on 2.1 billion total direct (non-forwarded) emails in the last 90 days.

TL;DR For email authentication, more DNS cache = more better