• We had to restore from a backup today after a failed software update. Backup was from 0000 EDT and restored it at 0800 EDT so we lost about 8hrs. Today is 07/20/2024. More info here.

SPF not working

banderas20

Active Member
Joined
Aug 1, 2018
Messages
102
Reaction score
42
Credits
799
Hi!

I am running Postfix and I have set this SPF record in my DNS hosting in "domain.com":

Code:
"v=spf1 include:<public_ip> ~all"

Where "public_ip" is my public IP.


I am running Postfix from inside a VM with its own internal IP.

The command issued is:
Code:
echo "Message body" | mail -s "Subject" [email protected] -aFrom:[email protected]

I am able to send the e-mail to GMAIL. However, it flags the mail with a:

Code:
SPF:    PERMERROR with IP <public_ip>

¿What am I doing wrong?

Thanks!
 


If you're going to use an ip in your spf record it should look like this:
Code:
"v=spf1 ip4:1.2.3.4 ~all"
include is for if you want to include an existing spf record.
 
Have a look at the spf record of gmail.com.
gmail.com descriptive text "v=spf1 redirect=_spf.google.com"
_spf.google.com descriptive text "v=spf1 include:_netblocks.google.com include:_netblocks2.google.com include:_netblocks3.google.com ~all"
_netblocks.google.com descriptive text "v=spf1 ip4:35.190.247.0/24 ip4:64.233.160.0/19 ip4:66.102.0.0/20 ip4:66.249.80.0/20 ip4:72.14.192.0/18 ip4:74.125.0.0/16 ip4:108.177.8.0/21 ip4:173.194.0.0/16 ip4:209.85.128.0/17 ip4:216.58.192.0/19 ip4:216.239.32.0/19 ~all"
 

Members online


Top