What Is the Difference Between SPF ~all and -all?
Short answer
In SPF, ~all requests a softfail for unmatched senders and -all produces a fail for them. The receiver decides how to handle either result with its filters and other authentication. Confirm every legitimate sending route before switching an existing record to hardfail.
By Xpoudy ·
Read the policy from the actual envelope domain
SPF evaluates the envelope sender or the relevant SMTP identity. Check the TXT for the intended hostname. Compare the mechanisms before all to see what the policy authorizes. A visible From address can use a separate domain from the one evaluated.
Choose based on provider guidance and evidence
Inventory all senders for that hostname and review their current documented SPF settings. Use an agreed policy and check it stays within the DNS lookup limit. Do not publish two policies at the same hostname while testing. Retain the previous record and a validation plan.
Verify actual behavior
Use Xpoudy’s SPF Checker to confirm the resulting policy and test a message from each authorized source. Inspect the receiver’s header for the SPF result and alignment. A softfail or fail can matter differently when DKIM passes and aligns.