How to fix: SPF Exceeds 10 DNS Lookup Limit
The SPF record triggers more than 10 DNS lookups during evaluation. RFC 7208 mandates a maximum of 10 DNS lookups; exceeding this causes a permerror, causing SPF to fail for all messages.
Why it matters
When SPF returns permerror due to too many lookups, receivers may treat all mail from your domain as unauthenticated. Combined with a DMARC p=reject policy, this causes legitimate mail to be rejected.
Each include:, a:, mx:, ptr:, and exists: mechanism in SPF counts as a DNS lookup. Nested includes recursively count their own lookups against the 10-lookup limit. Exceeding this limit results in a permerror, which some receivers treat as a hard fail.
How to fix it
- 1Replace include: for senders with static IP ranges using ip4: or ip6: mechanisms.
- 2Flatten deeply nested SPF includes using tools like dmarcian's SPF Surveyor.
- 3Verify the lookup count with: dig TXT example.com | grep v=spf1
Code examples
Flattened SPF
example.com. IN TXT "v=spf1 ip4:203.0.113.0/24 ip4:198.51.100.10 include:_spf.google.com -all"
# Use ip4:/ip6: instead of include: where possibleReferences
Detected automatically by VulnRadar. The check id is email-spf-lookup-count-too-high, stable across every scan so you can filter or diff on it.
More email checks
- LowDMARC Forensic Report URI (ruf=) Missing
- MediumDMARC Aggregate Report URI (rua=) Missing
- MediumMTA-STS (SMTP Strict Transport Security)
- LowTLS-RPT Record Missing rua= Reporting URI
- HighSPF Redirect Loop
- LowDMARC pct= Below 100
- MediumDMARC Policy Set to Monitor-Only (p=none)
- MediumMTA-STS Policy File Missing
Questions
- How severe is SPF Exceeds 10 DNS Lookup Limit?
- VulnRadar rates this high severity in the email category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
- Does VulnRadar check for this automatically?
- Yes. It runs as part of every scan under the check id email-spf-lookup-count-too-high, which stays the same between runs so you can filter, diff, or gate CI on it.
Missing a check?
The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.