Question How to set up an SPF record for Gmail on my server

cve60069

Distinguished
Jul 15, 2010
46
4
18,535
Hello.

Gmail is blocking my emails that I send to Gmail. I have my own email account with StackCP. The information I am getting is that I need to set up my SPF record on my server. I have found the location on the server where I need to add the SPF record but I am unsure how to write the record. This is the google link with the choices to me.


I am using the first record in the Google list - "v=spf1 ip4:192.168.0.0/16 include:_spf.google.com ~all" . If I use the third record, my TXT would be "v=spf1 a:mail.stackmail.com ip4:185.151.30.158 include:_spf.google.com ~all".

I have no idea if the DKIM settings are correct.

I am open to offers.


Dan
 
SPF record usually looks like this, I think you only need either SPF or DKIM

Code:
Type: TXT
Host/Name: yourdomain.com
Value: v=spf1 ip4:[your ip address] -all

Sometimes it's your IP that is blocked as well, you should check if the IP is on a blacklist.
 
FYI the ip in the "SPF" (sender permitted from), needs to be the internet/public ip address that's visible to the outside, not your private internal 192.168.x.x one. If you can go to whatismyip.com from your email server, that should tell you the correct ip.