Blog article

04 Aug 20265 minutes read

Kiara SaloojeeKiara SaloojeeDMARC Enthusiast

SPF Record Audit: Finding and Fixing Syntax Issues

An Email Showing Documentation And Configuration Surrounding It

SPF record audit overview:

  • Syntax validation alone doesn’t mean an SPF record is protecting the domain.
  • An SPF record audit checks syntax, lookup count, sender mapping, and ownership.
  • RFC 7208 caps SPF at 10 DNS lookups; exceeding it returns a PermError.
  • Qualifiers (~all, -all, ?all) determine how unauthorized messages are handled.
  • Consolidation is staged: baseline, confirm removals, flatten, deduplicate, then monitor.
  • Confirm the vendor is still contracted and actively sending email for this domain.
  • Confirm the IP range belongs to infrastructure still in production use.
  • Confirm the include is still maintained by the vendor, not abandoned.
  1. Baseline first. Before making any changes, document the current record exactly as published and confirm current delivery rates for all email streams. You need a baseline to detect regressions.
  2. Identify removals. Start with mechanisms that map to decommissioned vendors or IP ranges that have been reassigned. These are safe to remove after confirmation.
  3. Replace nested includes with flattened IP ranges. Some third-party sending services publish stable, documented IP ranges that can be expressed as ip4 blocks instead of include chains. Flattening reduces lookup count but requires monitoring when vendor IP ranges change.
  4. Consolidate duplicate mechanisms. Remove ip4 entries that fall within an existing CIDR block. Remove includes that duplicate coverage already provided by another mechanism.
  5. Test in staging where possible. For companies with a test domain, publish the revised record on the test domain and run delivery tests before applying to production.
  6. Publish and monitor. After publishing, monitor DMARC aggregate reports for any increase in SPF failures. These reports show which senders are actually passing or failing SPF.
  7. Update documentation. Record the new state, the rationale for each remaining mechanism, and the owner for each authorized sender.
Share:

Get the latest email security updates delivered to your inbox each month

Is Your Domain Protected?

Get your domain’s security score in seconds.
Check your impersonation, privacy, and branding ratings.

If you’re at risk of impersonation, one of our experts will be in touch to assist.

Useful Tools

DNS Lookup
Free toolNo sign-up

DNS Lookup

Use Sendmarc's DNS lookup tool to instantly analyze domain records, verify configurations, and detect DNS issues for better performance.

Email Header Analyzer
Free toolNo sign-up

Email Header Analyzer

Quickly analyze email headers with Sendmarc’s email header analyzer. Check SPF, DKIM, and DMARC results, detect phishing, and improve email deliverability.

Domain Checker
Free toolNo sign-up

Domain Checker

Use the Sendmarc domain checker to test against malicious use - free, no sign-up required, with results in under a minute.