SPF troubleshooting
SPF PermError
A PermError (permanent error) means receivers can't evaluate a domain's SPF policy because of a problem in the published records that won't go away on retry. Mail that triggers it gets no usable SPF result until the records are fixed. Check a domain for the causes this tool detects below.
- PermError causes
- Syntax errors
- Include and redirect chain
About SPF PermError
What a PermError is
PermError is one of the results defined by SPF (RFC 7208). It's different from fail, where the record is valid and the sender isn't listed, and from temperror, where a DNS lookup failed temporarily and a later attempt may succeed. A PermError comes from the published records, not a temporary DNS failure, so retrying won't clear it. Some causes, such as multiple SPF records or a syntax error in the domain's own record, affect every evaluation. Others, such as exceeding the lookup limit or a broken include, occur only when evaluation reaches that part of the record.
How receivers handle a PermError varies. For DMARC it isn't a pass, so SPF can't help the message pass DMARC and an aligned DKIM signature is needed instead.
Causes this tool checks
- More than one SPF record published at the domain.
- Syntax errors, such as an unknown mechanism, a malformed IP address or prefix length, an invalid domain name, or a repeated
redirect=modifier. - Evaluation needing more than 10 DNS lookups. The 10-lookup limit explains how they're counted.
- An
include:orredirect=chain that loops back on itself. - An
include:orredirect=pointing at a domain that has no SPF record, more than one, or one with a syntax error.
Causes this tool doesn't check
- Too many void lookups. SPF allows at most two DNS lookups that return no records; more causes a PermError. Whether that happens can depend on the receiver's resolver at the time.
- An
mxwith more than 10 mail hosts. Eachmxmechanism may resolve to at most 10 MX hosts. - Macro-dependent targets. Terms containing macros such as
%{i}depend on the sending server or message, so they can only be evaluated for a real message.
Fixing a PermError
Fix each cause the check reports, then run it again. Problems in your own record are yours to change. For a problem inside an included domain, check that the include matches the provider's current instructions; if it does, the provider has to fix its record.
What this check covers and its limits
- “No checked PermError cause detected” means none of the causes listed above were found. It doesn't rule out the causes this tool doesn't check.
- If part of the record can't be looked up, for example because a DNS server times out, the result is reported as incomplete rather than clear.
- Results reflect DNS at the time of the scan; receivers may see different answers while records propagate.
- This result covers PermError causes only; the full checker reports every other SPF and DMARC finding.