SoftFail SPF Record –
๐ Step 1: Identify the Problem
Common causes:
- Missing sending services (Microsoft 365, website, CRM, etc.)
- Multiple SPF records (only ONE is allowed)
- Incorrect
includestatements - Emails being sent from an IP/domain not listed in SPF
๐ ๏ธ Step 2: Check Your Current SPF Record
Use a tool like:
- MXToolbox (SPF lookup)
nslookup -type=txt yourdomain.com
Example SPF:
v=spf1 include:spf.protection.outlook.com ~all
This is valid for Microsoft 365, but will softfail if:
- Emails come from a copier/printer
- A website sends mail
- A 3rd-party service (like Mailchimp, etc.) sends mail
โ Step 3: Fix the SPF Record
โ๏ธ Add All Legitimate Senders
Examples:
Microsoft 365 only
v=spf1 include:spf.protection.outlook.com -all
Microsoft 365 + Website Server
v=spf1 ip4:192.168.1.10 include:spf.protection.outlook.com -all
Microsoft 365 + Mailchimp
v=spf1 include:spf.protection.outlook.com include:servers.mcsv.net -all
โ ๏ธ Step 4: Replace ~all with -all (Hard Fail)
Once you’re confident everything is included:
~all= SoftFail (monitoring mode)-all= HardFail (strict enforcement)
๐ Recommended progression:
- Start with
~all - Validate logs / headers
- Move to
-all
๐ฅ Step 5: Check for Common Mistakes
โ Multiple SPF Records
BAD:
v=spf1 include:spf.protection.outlook.com ~all
v=spf1 include:servers.mcsv.net ~all
โ๏ธ FIX:
v=spf1 include:spf.protection.outlook.com include:servers.mcsv.net -all
โ Too Many DNS Lookups (limit = 10)
Each include: counts toward the limit.
Fix:
- Remove unused services
- Use subdomain delegation if needed
โ Missing Internal Devices
Things like:
- Printers
- Firewalls
- Backup systems
๐ Add them:
ip4:PUBLIC_IP_OF_DEVICE
๐งช Step 6: Test After Fix
- Send email to Gmail
- Check headers โ look for: SPF: PASS
- Use MXToolbox SPF validation
๐ก Pro Tip (Production Environments)
If you’re managing a full environment:
- Pair SPF with:
- DKIM
- DMARC (
p=quarantineโp=reject)
- Monitor via DMARC reports before enforcing strict SPF
๐ Quick โSafe Fixโ Template
If you’re unsure, start here:
v=spf1 include:spf.protection.outlook.com ~all
Then gradually tighten to:
v=spf1 include:spf.protection.outlook.com -all