SPF SoftFail vs Fail: Which to Use in 2026
Compare ~all and -all in SPF records. SoftFail (~all) helps during migrations; Fail (-all) blocks unauthorized senders after validation.

On this page
TL;DR — Key takeaways
- SoftFail (~all) marks unauthorized mail as suspicious but allows delivery; Fail (-all) rejects it outright at the MTA level.
- Use ~all during email provider migrations or when adding new sending sources to avoid breaking legitimate mail flow.
- Switch to -all once all authorized senders are validated and you want maximum protection against spoofing attacks.
- DMARC policy (p=reject) can override SPF SoftFail, so evaluate both records together before making changes.
- Test SPF changes with a subdomain or monitoring tool before applying them to your primary domain.
SPF records end with a mechanism that tells receiving mail servers what to do when an email comes from an IP address not listed in your record. The two you'll see most often are ~all (SoftFail) and -all (Fail).
SoftFail marks the message as suspicious but lets it through. Fail blocks it outright. The difference matters when you're migrating email providers, adding new sending services, or tightening security after a spoofing incident. Pick the wrong one and you'll either break legitimate mail or leave your domain wide open to abuse.
What SoftFail and Fail Actually Do
An SPF record is a DNS TXT entry that lists which IP addresses and domains are allowed to send email on behalf of your domain. The all mechanism at the end is the default action for any sender not explicitly listed.
SoftFail (~all) tells the receiving server: this sender isn't authorized, but don't reject the message outright. Tag it, score it negatively, maybe put it in spam, but deliver it. Most receiving MTAs treat SoftFail as a suggestion rather than a rule.
Fail (-all) is a hard stop. It says: if the sender IP isn't in my SPF record, reject the message during the SMTP transaction. The email never reaches the inbox or spam folder—it bounces back to the sender with a 550 error.
There's also Neutral (?all) and Pass (+all), but almost nobody uses them in production. Neutral means 'no policy' and Pass explicitly allows everything, which defeats the purpose of having an SPF record.
When to Use SoftFail
SoftFail is the safe default when you're still discovering all the places your domain sends mail from. Marketing platforms, transactional email services, CRM tools, and helpdesk systems all send on your behalf, and it's easy to miss one.
I've seen production outages caused by switching to -all without accounting for a forgotten Zendesk integration or an old Mailchimp account still sending monthly newsletters. SoftFail buys you time to audit without breaking things.
Use ~all during provider migrations. If you're moving from Google Workspace to Microsoft 365, or from SendGrid to Postmark, keep SoftFail active until the new provider is fully validated and the old one is decommissioned. Check your logs daily during this window.
SoftFail also makes sense if you have a complex sending environment with multiple subsidiaries, regional offices, or third-party services that change frequently. The operational overhead of maintaining a strict -all record might outweigh the security benefit.
- Marketing and transactional email platforms (Mailchimp, SendGrid, Postmark)
- SaaS tools that send notifications (Zendesk, Jira, Salesforce)
- Internal mail servers, especially in multi-office setups
- Backup MX or relay servers used during failover scenarios
When to Use Fail
Fail is the right choice when you've mapped every authorized sender and want maximum protection. If your domain shows up in spoofing attempts or phishing campaigns, -all combined with DMARC p=reject will kill most impersonation attacks.
Financial institutions, healthcare providers, and any organization handling sensitive customer data should default to -all. The reputational and compliance risk of a successful spoofing campaign far outweighs the operational effort of maintaining an accurate SPF record.
Switch to -all only after monitoring your email logs with ~all for at least two weeks. Look for any SPF SoftFail results in your outbound mail—those would turn into hard bounces under -all. Tools like Postmark's email health check or MXToolbox can simulate the validation without touching production.
How DMARC Changes the Equation
SPF doesn't work alone anymore. DMARC (Domain-based Message Authentication, Reporting, and Conformance) adds a policy layer on top of SPF and DKIM alignment. If your DMARC policy is set to p=reject, the receiving server will reject mail that fails SPF alignment even if your SPF record ends with ~all.
So what if you're running ~all in SPF but p=reject in DMARC?
The DMARC policy wins. The receiving server sees the SPF SoftFail, checks the DMARC record, and enforces the reject action. This setup gives you the safety net of SoftFail at the SPF level while still blocking spoofed mail through DMARC.
In support tickets I handled, the usual confusion comes from organizations that tightened their DMARC policy without updating SPF. They assumed ~all was protecting them, but DMARC p=reject was already doing the heavy lifting. Check both records together—never tune one in isolation.
Testing SPF Changes Without Breaking Production
Never apply -all to your primary domain without testing first. Set up a subdomain (like test.yourdomain.com) with an identical SPF record ending in -all, then send test messages through all your mail services using that subdomain as the envelope sender.
Monitor the results in your receiving server logs or use an email testing service that shows SPF validation details. If everything passes, replicate the change to your main domain during a low-traffic window.
Keep a backup of your current SPF record before making changes. DNS propagation is fast, but rolling back a broken SPF record still takes 15-30 minutes globally, and that's long enough to lose important mail.
For high-volume senders, deploy the change in stages. Start with a less-critical subdomain (like newsletters.yourdomain.com), validate for a week, then move to the primary domain. Document every authorized sender in a spreadsheet or internal wiki so future engineers don't have to reverse-engineer your SPF record from bounce logs.
Real-World Trade-Offs and Recommendations
SoftFail (~all) is the right default for most small businesses and growing teams. It prevents catastrophic delivery failures while you scale your sending infrastructure. The security gap is real, but manageable if you pair it with DMARC monitoring.
Fail (-all) is the target state for mature email operations. Once you've audited your senders, validated your DMARC reports, and confirmed zero false positives over a two-week monitoring period, make the switch. The protection against domain spoofing is worth the operational overhead.
For organizations with compliance requirements (PCI-DSS, HIPAA, SOC 2), -all is effectively mandatory. Auditors expect to see strict SPF policies, and SoftFail won't pass most security assessments.
If you're a hosting provider or MSP managing client domains, default new domains to ~all and include -all as an opt-in upgrade once the client confirms their sending sources. This avoids emergency support tickets from broken mail flow while still offering strong security to clients who need it.
Quick troubleshooting checklist
- Audit current SPF record and list all authorized sending IPs and domains
- Deploy ~all if migrating providers or adding new mail servers
- Monitor email delivery logs for 7-14 days after SPF changes
- Verify DMARC policy alignment with your SPF mechanism choice
- Switch to -all only after confirming zero false positives in production
- Keep SPF record under 10 DNS lookups to avoid validation failures
FAQ
Does ~all actually protect against email spoofing?
SoftFail (~all) provides weak protection because it only flags unauthorized mail as suspicious without blocking it. Receiving mail servers decide whether to deliver, quarantine, or reject based on their own policies. For real protection against spoofing, use -all combined with DMARC p=quarantine or p=reject.
Will switching from ~all to -all break my email delivery?
It will break delivery only if your SPF record is incomplete or if you have legitimate senders not listed in the record. Audit your sending sources first, deploy the change, and monitor bounce logs for 7-14 days. Legitimate mail from authorized servers will continue working without interruption.
Can I use -all with a lenient DMARC policy?
Yes. SPF -all rejects mail at the SMTP level if the sender IP is not authorized, while DMARC p=none only monitors alignment without enforcing action. This combination gives strong SPF protection while you collect DMARC reports before tightening the DMARC policy to p=quarantine or p=reject.
Related articles
- Hosting OperationsSelf-Hosted App Deployment Fails? Check DNS, SSL, Reverse Proxy, and Logs FirstTroubleshoot failed self-hosted app deployments by checking DNS, SSL, reverse proxy routing, container status, logs, and ports.
- Hosting OperationsSelf-Hosted PaaS on a VPS: What to Check Before Installing Coolify, Dokploy, or CapRoverA hosting support checklist for preparing a VPS before installing self-hosted PaaS tools like Coolify, Dokploy, or CapRover.
- Hosting OperationsLinux Server Security Lessons from the Arch Linux Malware Package IncidentPractical Linux server security checklist for VPS admins after package malware concerns, with safe checks, rollback steps, and support guidance.
- Hosting OperationsAWS Lightsail Hong Kong VPS Latency: Practical Hosting Guide for IndonesiaLearn how to test AWS Lightsail Hong Kong VPS latency, compare regions, migrate safely, and troubleshoot hosting performance.
- Hosting OperationsCloudflare Tomorrow Watchlist: A Practical Hosting Operations GuidePractical Cloudflare troubleshooting checklist for DNS, SSL, caching, WAF, origin health, safe testing, and rollback planning.
- Hosting OperationsNetwork Safety Checklist for AI Agent Skills in Hosting OperationsAudit AI agent skills safely with network checks, secret protection, sandbox testing, rollback steps, and hosting support troubleshooting guidance.