Why SPF records with over ten lookups fail
An SPF record tells receiving mail servers which systems are authorised to send messages for a domain. It is a valuable defence against spoofing, but its DNS lookup limit is easy to overlook. When evaluation requires more than ten DNS-based mechanisms or modifiers, the recipient may return a permanent error instead of accepting the policy.
This issue affects organisations of every size, from a family business in Brisbane to a national retailer sending campaigns from Sydney. Understanding how the limit works helps domain owners protect delivery rates, reduce impersonation risk and avoid confusing authentication results.
Why the lookup limit matters
The Sender Policy Framework specification limits a single SPF evaluation to ten DNS lookups. The rule exists to prevent receiving servers from being forced into excessive DNS queries, which could create delays or be exploited for denial-of-service attacks.
If evaluation exceeds the limit, the result is generally PermError. That means SPF has not successfully confirmed the sender, even when the sending service itself is legitimate. A message might still be delivered, but DMARC alignment, filtering decisions and mailbox reputation can all be affected.
What counts as a DNS lookup
The mechanisms include, a, mx, ptr, exists and redirect can trigger DNS queries. An include is particularly deceptive because the referenced provider may contain several more mechanisms, and each nested record contributes to the same ten-lookup budget.
Mechanisms such as ip4, ip6 and all do not require DNS lookups. However, an mx mechanism can expand into multiple host records, while an include can branch into several services. The visible SPF line may look short while its complete evaluation path is much larger.
Why SPF records become too complex
Modern organisations commonly use Microsoft 365 or Google Workspace alongside a marketing platform, helpdesk, CRM, transactional email provider and website host. Each vendor may ask the domain owner to add an include, creating a chain that grows unnoticed over time.
Australian businesses often add services as they expand between Melbourne, Perth and regional offices, or when a local agency manages campaigns separately from the internal IT provider. Old vendor entries can remain in DNS after a contract ends, consuming lookup capacity without serving a useful purpose.
How an SPF failure appears
A domain can have a syntactically valid TXT record and still fail SPF evaluation. Common signs include a DMARC report showing spf=permerror, sporadic delivery problems, or messages arriving in junk folders at Gmail, Outlook and corporate gateways.
The sending IP may be authorised in a nested record, yet the receiver may never reach that entry because the lookup ceiling was already exceeded. This is why adding another include is not a reliable fix when a campaign is rejected on a busy Friday arvo.
| SPF element | Counts towards ten lookups? | Typical risk |
|---|---|---|
include |
Yes | Nested vendor records expand quickly |
a |
Yes | A domain may resolve several addresses |
mx |
Yes | Each mail exchanger can add DNS work |
exists |
Yes | Often overlooked during audits |
redirect |
Yes | Transfers evaluation to another policy |
ip4 or ip6 |
No | Usually efficient for fixed senders |
all |
No | Ends the policy decision |
Ways to reduce the lookup count
Start by listing every system that sends mail for the domain, including invoices, password resets, newsletters and support tickets. Remove obsolete includes and replace broad vendor records with documented ip4 or ip6 entries where the provider offers stable sending addresses.
SPF flattening can publish the resolved IP addresses directly, reducing nested lookups. It requires maintenance because providers change infrastructure, and manually flattened records can become stale. A managed flattening service may be appropriate for a larger organisation, but its updates and operational responsibility should be clearly understood.
How to test an SPF policy
Check the complete DNS record rather than reading only the TXT value shown in a control panel. Test every legitimate sender, including an Australian office using a separate mail relay or a cloud service configured by an external IT contractor.
A sender score checker can help review domain trust and authentication signals alongside SPF. Testing should also include DKIM signing and DMARC alignment, because SPF alone does not prove that the visible From domain is protected.
What domain owners should monitor
Set DMARC reporting to collect authentication results from recipient networks, then review the reports for permerror, unexpected senders and alignment failures. A policy can begin with monitoring and move towards quarantine or rejection after legitimate services have been identified.
Training matters as well. Staff in a Geelong office or a Canberra government supplier may recognise suspicious wording, yet still trust a message that appears to come from the company domain. A practical phishing awareness guide can connect domain reputation data with real-world reporting exercises.
Keep an inventory of authorised platforms, assign ownership for DNS changes and review the SPF design whenever a supplier is added or removed. That routine prevents a once-manageable policy from quietly crossing the ten-lookup boundary.