What is SPF Permerror and How to Fix It
What is SPF Permerror?


An SPF Permerror is a permanent error in your SPF record, meaning there’s something wrong with it that stops it from working.
A Permerror result is returned by receiving mail servers when your SPF record has a critical issue that makes it impossible to evaluate, such as incorrect syntax, too many DNS lookups (over the 10-limit),or invalid mechanisms. Unlike a regular SPF “fail” (which means an email didn’t pass authentication),a Permerror indicates that the SPF record itself is broken or misconfigured. This not only affects deliverability but can also weaken your DMARC protection if SPF is the only mechanism you’re using to align your email.
Key Differences: SPF Fail Vs SPF Permerror
| SPF Fail | SPF Permerror | |
|---|---|---|
| What it means | The SPF record was found and evaluated, but the sender is not authorized | The SPF record could not be evaluated due to an error or misconfiguration |
| Cause | Sender IP not listed in the domain’s SPF record | Broken SPF syntax, too many DNS lookups, or other critical issues |
| Issue Type | Temporary issue (email not authorized) | Permanent error (SPF record is invalid or unreadable) |
| Impact | Email may likely be rejected or marked as spam | Email may be rejected or pass through without SPF validation |
| DMARC alignment | Can cause DMARC fail if SPF is not aligned | Can break DMARC, especially if SPF is your only aligned mechanism |
| Fix | Go through your sender list to authorize legitimate senders | Requires fixing the SPF record to restore functionality |
What Causes SPF Permerror?
An SPF Permerror can be triggered by several issues, including excessive DNS lookups, syntax errors, misconfigured records, or even overly large SPF entries. Let’s break down the most common causes:
1. SPF Syntax Errors
Incorrect formatting or invalid syntax in the SPF record can lead to a Permerror, preventing proper evaluation.
Common causes:
- Missing or misplaced characters (e.g., quotes ” or colons
- Invalid or malformed mechanisms or qualifiers (e.g., using include_spf.example.com instead of include:spf.example.com)
- Incorrect macro definitions or unsupported macros
Examples:
❌ v=spf1 include_spf.example.com -all → missing colon in include
❌ v=spf1 +mx a:mail.example.com -all → + qualifier is unnecessary and often misused
2. DNS Configuration Issues
These involve problems with the DNS setup related to your SPF record.
Common issues:
- SPF record pointing to non-existent or misconfigured domains
- Missing SPF records on referenced domains
- Invalid or deprecated DNS record types (e.g., using SPF-type records instead of TXT)
Example:
Your domain references include:spf.partner.com, but spf.partner.com doesn’t exist or lacks a TXT record, leading to SPF evaluation failure.
3. Too Many DNS Lookups
SPF allows only 10 DNS lookups during record evaluation, as defined in RFC 7208, Section 4.6.4. This is a security measure to prevent abuse (e.g., Denial-of-Service attacks) and keep evaluations lightweight.
What counts as a lookup:
- include
- a, mx, ptr
- exists, redirect
Void lookups (queries that return no DNS data) are also limited to 2.
Common cause:
An SPF record with many include: mechanisms or nested includes that collectively exceed the 10-lookup limit.
4. Circular Includes
Circular includes occur when SPF records refer back to each other in a loop, creating infinite resolution cycles.
Example:
- Domain A: v=spf1 include:domainB.com -all
- Domain B: v=spf1 include:domainA.com -all
This circular reference causes SPF evaluation to fail, often resulting in a Permerror.
5. Invalid Mechanisms or Qualifiers
Using unrecognized or deprecated mechanisms in your SPF record can result in a Permerror.
Common mistakes:
- Typos like ip6v instead of ip6
- Unsupported mechanisms such as all:, ptr: used incorrectly
- Using + or ? qualifiers unnecessarily or incorrectly
Example:
❌ v=spf1 ptr:mail.example.com -all → discouraged mechanism
❌ v=spf1 ip4v:192.0.2.0/24 -all → invalid mechanism (ip4v should be ip4)
6. Oversized SPF Records
SPF records must adhere to size limitations:
- Each string in a TXT record must be ≤ 255 characters
- Total TXT record length should not exceed 512 bytes
Causes of oversized records:
- Too many IPs, includes, or mechanisms
- Duplicated or unnecessary entries
Example:
A record like v=spf1 ip4:192.0.2.0/24 ip4:198.51.100.0/24 include:spf1.example.com include:spf2.example.com include:spf3.example.com include:spf4.example.com -all may exceed DNS limits or size constraints.
How SPF Lookup Overload Breaks Your Emails

When your SPF record triggers more than 10 DNS lookups, it can seriously disrupt your email delivery. Here’s what can happen:
- Delivery delays: Email servers may slow down processing while trying to evaluate your SPF record, causing delivery delays.
- Timeout errors: Too many lookups can lead to timeouts during SPF evaluation, causing messages to fail silently or get dropped.
- Rejected emails: Some receiving servers may outright reject or flag emails with SPF Permerror to protect their infrastructure.
- DMARC fails: If your DMARC policy relies on SPF alignment, a failed SPF check can break DMARC and reduce your domain’s trustworthiness.
How to Fix SPF Permerror (Step-by-Step)
Manual Fixes
- Remove Unused include Mechanisms
Go through each include: in your SPF record and check if it’s still necessary. If it’s linked to a service you no longer use, remove it.
- Replace include with IP Addresses (if static)
If an include: just points to a static IP or small IP range, replace it directly with an ip4: or ip6: mechanism to avoid a DNS lookup.
- Eliminate PTR Mechanisms
PTR is discouraged by RFC 7208 due to performance and reliability concerns. Remove it entirely to reduce lookups and avoid errors.
- Consolidate include Domains
Some services (e.g., email platforms or providers) offer multiple SPF entries. Check their documentation, as often they provide a single consolidated include you can use instead of multiple ones.
- Use ip4 / ip6 Where Possible
If you know the IPs of your sending servers, add them directly using ip4: or ip6: instead of relying on mechanisms like MX or A that consume lookups.

Automatic Fixes
There are two ways in which you can automatically optimize SPF record. They are:
- Automatic SPF Flattening Tools
- SPF Macros Optimization
We will discuss both in detail in the next section.
Standard Email Protocols: SMTP, POP3 & IMAP Free4 m
What is Email Security? Free4 m
Email Security Practices Free4 m
Building an Email Security Compliance Model Free5 m
Corporate Email Security Checklist Free3 m 30 s
What is the difference between Inbound email security and outbound email security? Free4 m
What is Information Security? Free4 m
Zero Trust Security Model Free3 m
What is a DNS Lookup? Free4 m
Understanding the 10 DNS Lookup Limit for SPF Records Free3 m
SPF Void Lookups Explained Free2 m
Creating and Optimizing SPF records for your own domain Free4 m
Video Free2 m
What is SPF Permerror and How to Fix It Free7 m
Video Free2 m
SPF Flattening Free5 m
SPF Macros Free9 m
Video Free2 m
What is SPF Alignment? Free3 m
How to Set Up Microsoft Office 365 SPF record? Free4 m
How to Set Up Google Workspace SPF Record? Free2 m
How to Set Up MailChimp SPF Record? Free3 m
How to Set Up SendGrid SPF Record? Free2 m
How to Set Up Salesforce SPF Record? Free3 m
How to Setup Zoho Mail SPF Record? Free2 m
What is DKIM Alignment? Free3 m
DKIM Domain Alignment Failures Free6 m
How to Set Up DKIM for Microsoft Office 365? Free4 m
How to Set Up DKIM for Google Workspace? Free3 m
How to Set Up DKIM for MailChimp? Free4 m
How to Set Up DKIM for SendGrid? Free3 m
How to Set Up DKIM for Salesforce? Free3 m
How to Set Up DKIM for Zoho Mail? Free3 m
DMARC RFC 9989, 9990 and 9991 Free5 m
What is DMARC Compliance? Free2 m
DMARC Compliance Requirements Free2 m
The Benefits of DMARC Free2 m
DMARC Configuring Free3 m
Achieving DMARC Enforcement Free2 m
DMARC Vs Antispam Solutions Free2 m
DMARC Identifier Alignment Free2 m
DMARC sp Tag Exceptions & Uses Free1 m
Configuring DMARC without DKIM Free3 m
Configuring DMARC without SPF Free2 m
DMARC Aggregate Report Views Free3 m
Video - PowerDMARC Aggregate Reports Free2 m 13 s
DMARC Forensic Report Views Free2 m
Video - PowerDMARC Forensic Reports Free0 s
DMARC Forensic PGP Encryption and Decryption Free2 m
TLS Report Views Free3 m
Video - PowerDMARC TLS Reports Free0 s
PDF/CSV Reports Free2 m
Video - PowerDMARC PDF/CSV Reports Free1 m 1 s