SPF not working

banderas20

New Member
Credits
97
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!
 


f33dm3bits

Gold Member
Gold Supporter
Credits
7,310
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.
 

f33dm3bits

Gold Member
Gold Supporter
Credits
7,310
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