Topic · Authentication

SPF lookup limit

SPF evaluation can trigger a permerror when a policy exceeds its limit of ten DNS-querying mechanisms or modifiers.

Email Security Glossary·Practical guidance
Share this definition LinkedIn X WhatsApp Email
01 / How it works

How it works

include, a, mx, ptr, exists and redirect can consume the shared lookup allowance.

02 / What can go wrong

What can go wrong

SPF processing can return permerror if it exceeds ten DNS-querying mechanisms/modifiers; raw DNS-query volume and void lookups involve additional nuances.

03 / What to check or do

What to check or do

Flatten cautiously or consolidate authorized senders and retest recursively.

Practical scenario

Practical scenario

A published SPF TXT record appears short, but two include entries each expand into multiple nested includes. Receivers evaluate the entire lookup chain, not simply the textual count of include tokens in the root record.

Verification checklist

  1. Count only DNS-querying mechanisms and modifiers that are evaluated.
  2. Test multiple representative source IPs because evaluation follows different branches.
  3. Inspect redirect, exists, mx and a mechanisms as well as include.
  4. Remove obsolete services or use maintained optimization rather than blindly adding records.
Practical diagnosis

How to investigate SPF lookup limit

Signal to investigate
A policy with several include directives can fail selectively as nested mechanisms consume the DNS budget.
Evidence to collect
Evaluate the actual path for a sender IP and count DNS-querying mechanisms, including recursion.
Common wrong conclusion
Ten is a processing limit, not a simple count of the words 'include' written in the top-level record.

How to interpret the evidence

The ten-lookup rule is not ten DNS packets and not a character limit. It applies to SPF mechanisms and modifiers that trigger DNS queries, with recursion, while additional constraints can apply to void lookups. A failure may show up only for specific sender IPs because another mechanism matched earlier in different evaluation paths.

What to change and how to verify it

Model at least one real IP for every sender, count lookups along each evaluated path and check DNS errors separately from permanent limit violations. Reduce obsolete includes, avoid risky static flattening, and repeat a real delivery test after changes.

Illustrative diagnostic — substitute your authorized domain or host
dig +short TXT example.com
Educational example; not validated against your live infrastructure.
NEXT STEP

Put this into practice

Run a focused check, then explore protection if your domain needs it.

Authoritative reference ↗