About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
An SPF result of fail, softfail or neutral is the qualifier on the mechanism that matched. RFC 7208 lists the qualifiers as "+" pass, "-" fail, "~" softfail and "?" neutral. The qualifier is optional and defaults to "+". The all mechanism "is a test that always matches", so the qualifier on all is the result for every host that did not match an earlier mechanism.
The protocol "establishes no normative requirements for handling any particular result" beyond the guidance in section 8. Publishing -all does not force every receiver to reject the mail.
What each result means
Section 2.6 defines the words. The range 2.6.2 to 2.6.5 is neutral, pass, fail, then softfail.
- Neutral (2.6.2): "the ADMD has explicitly stated that it is not asserting whether the IP address is authorized."
- Pass (2.6.3): "an explicit statement that the client is authorized to inject mail with the given identity."
- Fail (2.6.4): "an explicit statement that the client is not authorized to use the domain in the given identity."
- Softfail (2.6.5): "a weak statement by the publishing ADMD that the host is probably not authorized." It "has not published a stronger, more definitive policy that results in a "fail"."
Section 8 then tells a receiver what to do with each word.
A neutral result "MUST be treated exactly like the "none" result; the distinction exists only for informational purposes." Treating neutral more harshly than none "would discourage ADMDs from testing the use of SPF records". None means no usable SPF record was found, or no domain could be taken from the SMTP session.
Fail is explicit. "Disposition of SPF fail messages is a matter of local policy." If the checker rejects during SMTP, it "SHOULD use an SMTP reply code of 550" and, if supported, "the 5.7.1 enhanced status code". The RFC's example reply begins 550 5.7.1 SPF MAIL FROM check failed:. If it does not reject, it should record the result for later processing.
Softfail "ought to be treated as somewhere between "fail" and "neutral"/"none"." Receiving software "SHOULD NOT reject the message based solely on this result, but MAY subject the message to closer scrutiny than normal."
If no mechanism matches and there is no redirect, the result is neutral, "just as if "?all" were specified". The RFC says it is better to end the record explicitly with all or redirect. Mechanisms after all are never tested.
Likely causes
| What you published | Result for a non-matching sender | What a receiver is told |
|---|---|---|
-all |
fail | May reject with 550 and 5.7.1, or accept and record the result |
~all |
softfail | Should not reject on this result alone; may scrutinise |
?all, or no all and no redirect |
neutral | Must treat it like no SPF record |
+all or a bare all |
pass | The client is authorised, including hosts you did not list |
A host listed earlier with + or with no qualifier passes and never reaches all. A host listed with -ip4 fails at that mechanism, even if the record ends in ~all.
Prove the cause before changing anything
All of these are read-only.
1. Read the published record.
dig txt example.com
The dig manual gives the form dig @server name type. Here the name is example.com and the type is txt. The option +short "toggles whether a terse answer is provided." Use the verbose form when you need the status as well as the text. Write down the one record that begins with v=spf1. RFC 7208 section 4.5 says that if the record set "includes more than one record, check_host() produces the "permerror" result." That is a different fault from fail, softfail and neutral.
2. Find the mechanism that matches the sending host. Evaluation is left to right and stops at the first match. The qualifier on that mechanism is the result. If nothing earlier matches, all matches.
3. Read the receiver's result on a delivered test, if the message was accepted. The result word is fail, softfail or neutral. A 550 reply during SMTP is the reject path in section 8.4, which applies to fail.
Fix
Change the qualifier only when the result you see is the result you published, and it is not the result you want.
Save the current TXT answer with this command, and keep the file until the change is confirmed:
dig txt example.com > spf-example.com-before.txt
Risk: the next step replaces the published SPF record, and every receiver will evaluate the new record for as long as it caches that TXT. Replacing -all with ~all stops the explicit fail, and receivers may still scrutinise the mail. Replacing ~all with -all makes non-matching mail an explicit fail, which receivers may reject. Replacing either with ?all tells receivers to treat the mail like a domain with no SPF record.
In the DNS provider's console, replace the single v=spf1 string. Keep every mechanism that names a real sender, and set the final all qualifier to the policy you mean: -all for fail, ~all for softfail, ?all for neutral. Do not publish +all to "make mail pass". It matches every host.
To undo it, publish the v=spf1 string saved in spf-example.com-before.txt as the TXT value again. Receivers that cached the new value keep it until that record's TTL expires.
Example (illustrative): example.com publishes v=spf1 ip4:203.0.113.10 ~all. Mail from 203.0.113.50 is softfail. A receiver may scrutinise it more closely. The administrator wants that host to be an explicit fail, saves the TXT, and publishes v=spf1 ip4:203.0.113.10 -all. Mail from 203.0.113.10 still matches the ip4 mechanism and passes. Mail from 203.0.113.50 is fail. Restoring the saved string returns the softfail policy.
Confirm the fix
- Query the TXT record again and read the qualifier on
all. - Send from a host that should pass and from a host that should not. The two results should differ in the way section 2.6 describes.
- If you moved to
-all, watch for legitimate senders you forgot to list. They are now fail, not softfail.
What to watch afterwards
- A new sending service has to be a mechanism before
all, or it takes theallresult. - Neutral is not a soft pass. Receivers must treat it like none.
- Softfail is not a request to reject. A receiver that rejects on softfail alone goes against the "SHOULD NOT" in section 8.5.
- Permerror, from a broken record or too many DNS lookups, is neither fail nor softfail.
Read next
Related articles you may want next.
- TroubleshootingSPF permerror: too many DNS lookups. Count the limit of 10, then shorten the record safelySPF permerror because the record needs more than 10 DNS lookups. Count the terms that query DNS, find the extra ones and shorten the record safely.Read article
- HostingApplication Email Rejected or Junked After a Server Move: SPF, DKIM, DMARC and PTRApplication mail bouncing or junked after a migration? Read Authentication-Results, then fix SPF, DKIM, DMARC alignment, PTR and Microsoft 365 relay settings for the new path.Read article
- TroubleshootingDKIM PERMFAIL (body hash did not verify): the bh= hash does not matchDKIM returns PERMFAIL (body hash did not verify) when the body does not match bh=. See which body changes survive simple and relaxed canonicalization, and sign the body the receiver gets.Read article
Risks and limits
- Local policy decides whether fail is a reject or a mark. The RFC recommends 550 and 5.7.1 when the checker does reject at SMTP time.
- The result depends on which mechanism matches. The same record can pass one host and fail another.
- SPF does not by itself decide delivery.
Sources
- RFC 7208: Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1 — IETF, April 2014, accessed 22 November 2026
- BIND 9 manual pages: dig — ISC, BIND 9.20.22 manual, no date shown, accessed 22 November 2026
This article was originally published on .