The last part of an SPF record tells receivers what to think of servers that aren't listed:
| Ending | Result | Meaning |
|---|---|---|
-all | fail | Unlisted servers are not allowed to send for this domain. |
~all | softfail | Unlisted servers probably aren't allowed; treat with suspicion. |
?all | neutral | No statement. Protects nothing. |
+all | pass | Every server on the internet may send as you. Never use this. |
Which one to use
With DMARC in place, use ~all. DMARC decides what happens to mail that fails, and it treats softfail and fail
the same way. The difference is what happens before DMARC: some receivers reject a message outright on an SPF
fail, without looking at DKIM. That can bounce legitimate mail that was forwarded, even though its DKIM signature would have
passed DMARC. ~all leaves the decision to DMARC, which considers both.
Use -all for domains that don't send email at all (v=spf1 -all), or if you have no DMARC policy and
want the strongest SPF statement. Both are fine; the real protection comes from DMARC at quarantine or reject.
Never use ?all or +all. +all in particular turns SPF into a pass for any spammer. It sometimes appears
after someone "fixed" bounces by allowing everything.