Question
What is the syntax for SPF records?
Answer
SPF records are TXT records that tell other mail servers what IP addresses are authorized to send mail. cPanel's default SPF record looks like this:
example.tld. 14400 IN TXT "v=spf1 +a +mx +ip4:10.2.34.241 ~all"
- v is the version of the protocol used
- +a means A records for the domain are checked
- +mx means the MX records for the domain are checked
- +ip4 specifies a specific IP address that can send email
- all is how mail servers should treat passes or failures
- -all=Fail
- An IP not in the SPF record will not pass SPF checks
- ~all=Softfail
- SPF checks that do not pass are not rejected but noted.
- Spam filtering software uses this as a factor when filtering messages
- SPF checks that do not pass are not rejected but noted.
- +all=Pass
- Any IP address will pass an SPF check.
- ?all=Neutral
- SPF check failures neither pass nor fail
- -all=Fail
The full SPF protocol documentation can be found at the following link:
We want everyone who uses cPanel to have an amazing experience, both with our software and our support. Sometimes that means pointing you to an expert or external resource about your particular problem if it is not a cPanel-related issue, or if the external resource will better address your reported issue.