SPF fail, softfail and neutral: what they mean
SPF fail means the server that sent the message is not listed in the SPF record of the envelope sender's domain (the Return-Path), and that record ends in -all, a firm "not authorised". Softfail is the same finding with ~all, a weaker "probably not authorised"; neutral (?all) makes no claim either way. SPF checks the Return-Path domain, not the From address, so with an email provider the record that matters is the one on its bounce domain.
The seven SPF results
RFC 7208 defines every result an SPF check can return. The qualifier in front of the mechanism that matched (usually the final all) decides between pass, fail, softfail and neutral.
| Result | From | Meaning (RFC 7208) | What receivers do |
|---|---|---|---|
pass | + (default) | The IP is authorised for the domain | Counts for DMARC if the domain aligns |
fail | -all | Explicit statement that the IP is not authorised | May reject. Gmail: The (E)MAIL FROM domain [domain-name] has an SPF record with a hard fail policy (-all) but it fails to pass SPF checks with the ip: [ip-address]. (5.7.26) |
softfail | ~all | Weak statement that the IP is probably not authorised | The RFC says receivers should not reject on this alone, but may look closer |
neutral | ?all | The domain explicitly makes no statement | Must be treated exactly like none |
none | no record | No SPF record, or no usable domain | Nothing to go on |
temperror | DNS | A transient DNS error | Often deferred; a retry may pass |
permerror | your record | The record could not be interpreted | Treat as broken until you fix DNS |
Which domain SPF actually checks
SPF checks the domain of the envelope sender: the SMTP MAIL FROM, which the receiver records as Return-Path and reports as smtp.mailfrom. It never looks at the From header people see. (For bounces, which have an empty envelope sender, it checks the HELO name.)
Return-Path: <[email protected]>
Authentication-Results: mx.example.net;
spf=softfail smtp.mailfrom=bounces.example.net;
dkim=pass header.d=example.com;
dmarc=pass header.from=example.comHere SPF was checked against bounces.example.net, the provider's domain, not example.com. Adding the provider's include: to the SPF record on example.com would change nothing, because that record is not consulted. This is why transactional providers ask for a Return-Path subdomain instead: Postmark's pm-bounces.example.com CNAME, SendGrid's em1234.example.com CNAME, Resend's send.example.com. The provider maintains the SPF record behind it, and it aligns with your From domain for DMARC. See custom Return-Path domain.

Causes of SPF fail and permerror
- A sending service is missing from the record. Common for office mail, CRMs and helpdesks that use your root domain as the envelope sender. Add the service's
include:, or better, give it its own subdomain. - The message was forwarded. The forwarder's IP is not in your record, so SPF fails at the final mailbox. You cannot fix this in SPF; aligned DKIM is what keeps DMARC passing.
- More than 10 DNS lookups (
permerror). RFC 7208 limits the terms that cause lookups (include,a,mx,ptr,existsandredirect) to 10 per check, counting nested includes.ip4,ip6andalldo not count. Remove services you no longer use and move bulk senders to subdomains. - Two SPF records on one name (
permerror). Only onev=spf1record is allowed per name; merge them. - Lookups that return nothing. RFC 7208 says checks should allow at most two "void lookups" (no answer or a non-existent domain) before returning
permerror, so aninclude:for a retired service can break the whole record.
$ dig +short TXT example.com
"v=spf1 include:_spf.google.com include:mailgun.org include:spf.helpdesk.example.net ~all"
"v=spf1 include:servers.mcsv.net -all" <- a second SPF record: permerrorSPF fail, DKIM pass, DMARC pass
This combination is normal and usually fine. DMARC needs one aligned pass, and DKIM signed with your domain provides it. You see it most with forwarded mail, and on providers where the Return-Path is still the provider's domain (SPF then often passes, but for the wrong domain).
It is not fine for bulk senders to Gmail, which requires SPF and DKIM both to be set up and can block on SPF alone: This message was blocked because it didn't pass SPF authentication. Gmail requires bulk email senders to authenticate their email with SPF. (5.7.27). Gmail also has a separate error for records it distrusts: The SPF record of the sending domain has one or more suspicious entries. (5.7.24). The opposite case, SPF passing but DMARC failing, is an alignment problem.
Questions
What is the difference between SPF fail and softfail?
Fail (-all) states the IP is not authorised; softfail (~all) says it probably is not. RFC 7208 says receivers should not reject on softfail alone, while a fail can be rejected.
Is softfail worse than neutral?
Yes. Softfail says the IP is probably not authorised. Neutral (?all) makes no statement and must be treated exactly like having no SPF record.
What does SPF permerror too many DNS lookups mean?
Your record needs more than 10 DNS-querying terms, counting nested includes, so the check stops with permerror. Remove unused includes or move senders to their own subdomains.
Should I use -all or ~all?
Use ~all while you are still finding every service that sends as you, and -all once the record is complete. DMARC aggregate reports show which sources would fail.
Related
- Why DMARC fails, even when SPF or DKIM passesDMARC fails when no SPF or DKIM pass is aligned with the From domain. A pass on your provider's domain doesn't count. The causes and fixes.
- DKIM fail: what it means and how to fix each causedkim=fail means a signature did not verify: the body changed, signed headers changed, or the key is missing from DNS. Find the reason and fix it.
- Custom Return-Path domain: why and how to set it upA custom Return-Path puts bounces on your own subdomain so SPF aligns for DMARC. On Postmark: CNAME pm-bounces.example.com to pm.mtasv.net, then verify.
- Return-Path vs Reply-To vs From: which does whatFrom is who people see and what DMARC checks. Reply-To is where replies go. Return-Path is the envelope sender: bounces go there and SPF checks it.
- SPF, DKIM and DMARC explained, with a working setupSign with DKIM on your domain, align SPF via a custom Return-Path, start DMARC at p=none. The records for Postmark, Mailgun, SendGrid and Resend.
- 550 5.7.26: Gmail blocked unauthenticated email550 5.7.26 is Gmail rejecting mail that failed SPF and DKIM, failed a -all SPF record, or failed DMARC. Fix: DKIM for your own domain and an aligned From.