If SPF suddenly starts failing with permerror, the root cause is often not syntax. It is lookup budget.
SPF evaluation has a hard cap on DNS-querying terms, and once that cap is exceeded, receivers are expected to return a permanent error. This is defined in RFC 7208 section 4.6.4, and it is still the operational baseline in 2026.
The short version: SPF gives each evaluation only 10 lookup-causing terms. Complex sender setups with many include: chains can burn through that budget fast.
Per RFC 7208, these SPF terms trigger DNS lookups during evaluation:
includeamxptr (not recommended in modern deployments)existsredirect (modifier)And these do not consume lookup budget directly:
ip4ip6allTwo details that catch teams off guard:
include: can expand into more lookup-causing terms downstream.So this record can look harmless but still exceed limits in practice:
example.com. IN TXT "v=spf1 include:_spf.mailer.example.net include:_spf.crm.example.net include:_spf.marketing.example.org -all"If those included records are nested and use more include/mx/a terms, the receiver can legitimately return permerror.
DMARC uses SPF only when SPF produces a passing, aligned result for the 5321.MailFrom domain (or fallback behavior for null reverse-path cases), as described in RFC 7489 section 3.1.2 and section 4.1.
When SPF returns permerror, SPF cannot provide that aligned pass signal. If DKIM is also not aligned and passing, DMARC fails.
That is why lookup overrun is not just an SPF hygiene issue; it directly affects enforcement safety.
If alignment logic needs a quick refresh, keep DMARC identifier alignment deep dive open while auditing.
Use this sequence instead of guessing:
example.com, marketing.example.com, alerts.example.net).Authentication-Results) after each DNS change.Example DNS checks:
dig TXT example.com +short
dig TXT marketing.example.com +shortExample header clues on a failed message:
spf=permerror in Authentication-ResultsFrom domain under DMARC evaluationFor hands-on header reading patterns, DMARC troubleshooting with real headers is a useful companion.
There is no single universal fix, but these patterns consistently work.
If one root domain SPF record is carrying transactional, marketing, support, and platform traffic all at once, it usually grows past a safe lookup footprint.
Move streams to dedicated subdomains and publish lean SPF records per stream:
example.com for employee mailmarketing.example.com for campaign trafficalerts.example.com for product notificationsThat reduces cross-team coupling and keeps each SPF policy readable.
Many SPF records still reference old vendors months after migration.
If a sender no longer transmits mail, remove its include. This is often the fastest way to recover lookup budget.
ip4/ip6 where appropriateFor infrastructure under direct control and stable addressing, explicit ip4/ip6 can reduce dependency depth.
Use reserved example ranges in documentation and testing, for example:
example.com. IN TXT "v=spf1 ip4:192.0.2.10 ip4:198.51.100.0/24 -all"Do not copy these values literally into production.
Flattening can reduce lookups, but fully flattened records can become brittle when upstream sender IP pools change.
A safer approach is selective flattening for known-stable sources plus periodic validation.
Multiple SPF TXT records at the same host produce SPF permerror for a different reason (record selection ambiguity), which is also defined in RFC 7208 section 3.2.
Major mailbox providers continue to require clean authentication posture:
Different words, same operational reality: SPF has to be valid, maintainable, and under lookup limits.
If SPF is already near the edge, avoid big-bang edits.
If broader sender hygiene is in flight, Email sender requirements update guide (Google/Yahoo/Microsoft) and What is SPF? pair well with this checklist.
The SPF 10-DNS-lookup limit is not a soft recommendation. It is a protocol guardrail.
Treat SPF as an actively maintained dependency graph, not a one-time TXT record. Teams that keep SPF small and segmented avoid permerror incidents and make DMARC enforcement far safer.