Adding SPF for hostname

maestroc

Well-Known Member
Aug 23, 2012
90
2
58
cPanel Access Level
Reseller Owner
I have a working spf record that covers the root domain and ip addresses on the server. However, any emails that the root system sends out (notifications from cpanel, csf, etc.) are getting marked as failing spf and dkim even though everything else sent from individual user accounts work fine. It appears that my hostname vps.mydomain.com is not being accepted.

How can I update the settings so that WHM, etc. send out mails that pass both SPF and DKIM?

The current record looks like this:

v=spf1 ip4:xx.xx.xx.xx +ip4:xx.xx.xx.xy +a +mx include:_spf.google.com ~all

Is it just as simple as adding include:vps.mydomain.com to the record?
 

24x7server

Well-Known Member
Apr 17, 2013
1,912
99
78
India
cPanel Access Level
Root Administrator
Twitter
v=spf1 ip4:xx.xx.xx.xx +ip4:xx.xx.xx.xy +a +mx include:_spf.google.com ~all
May I know what is the reason for having google.com entry in the SPF?
 

24x7server

Well-Known Member
Apr 17, 2013
1,912
99
78
India
cPanel Access Level
Root Administrator
Twitter
Hi,

The SPF should contain the information of the server that it is coming out from, so no need to add google in it.. You can simply state the server IP addresses and hostname of the server if you want..
 

maestroc

Well-Known Member
Aug 23, 2012
90
2
58
cPanel Access Level
Reseller Owner
Hi,

The SPF should contain the information of the server that it is coming out from, so no need to add google in it.. You can simply state the server IP addresses and hostname of the server if you want..
According to Google I have to have that SPF record. Otherwise email sent out by Google Apps using my domain name will fail authentication (Configure SPF records to work with G Suite - G Suite Administrator Help).

In any case, disregard the google apps stuff as this is not related to my original question of this thread. I need to know how to set up my SPF records so that mail sent from vps.mydomain.com doesn't fail validation. The SPF record already covers stuff coming from mydomain.com. How do I get vps.mydomain.com to validate as well?