Skip to content

SPF record lets other servers send as you

Your SPF record is weak: its ending doesn’t ask receiving servers to act on unlisted servers, it uses ptr (which the standard says not to use), or it allows an address range so large that other companies’ servers are in it.

Why it matters

The last part of the record says what to do with mail from servers you haven’t listed. +all allows everyone and ?all says nothing, so both let fakes through. ~all marks them as suspicious and -all says to reject them.

ptr makes receiving servers do slow reverse lookups that often fail, so mail it was meant to allow can fail SPF. The SPF standard says not to use it.

A range such as ip4:0.0.0.0/0 or a whole cloud provider’s network lets everyone else on it send email as you, and SPF vouches for them.

How to fix it

  1. End the record with -all, or with ~all if your DMARC policy is already quarantine or reject:
    v=spf1 include:_spf.google.com -all
  2. Replace ptr with the ip4: or ip6: addresses your servers send from, or your email service’s include:.
  3. Replace any huge range with the exact addresses your servers send from, or the include: your email service gives you. Your provider can tell you which.

Common mistakes

  • Switching to -all before every service that sends for you is listed, so some of your own email starts failing.
  • Adding a whole hosting or cloud provider’s range “to be safe”. Everyone else on that provider can then send as you.
  • Thinking -all on its own stops fakes. Receiving servers decide what to do; DMARC with quarantine or reject is what tells them.

Check your fix

Once the change is live, check again. DNS changes can take up to a few hours to show everywhere.