Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.


I'm trying to correctly configure Google Apps SPF records for my domain using cPanel/WHM DNS.
I've currently got it setup like this as a TXT record:

Name: mydomain.com.
TTL: 14400
Record: v=spf1 +a +mx ipv4:1.1.1.1 include:_spf.google.com ~all

I believe the name and the syntax are incorrect, could someone help me correct this?
The reason I'm trying to include an IP is for applications that are hosted on that particular server that will be using the php mail() function. Does this matter?

Thanks!

share|improve this question

1 Answer 1

That current SPF record says that the IP address 1.1.1.1 and anything listed in _spf.google.com are valid senders for your email.

Unless your server's IP address really is 1.1.1.1 you will want to change that to the IP address that the account using the PHP mail() function uses. That may be the server's main shared IP, or (if you have the 'send mail via the dedicated IP of the account' tweak turned on) it may be the IP address of the account.

Also, assuming that you're running a fairly recent version of cPanel, there is a checkbox in the Modify Account settings to create both SPF and DKIM records for an account. You can use that and then just add in the include:_spf.google.com bit to the SPF record that is created.

Lastly, since this is a DNS record it is subject to propagation so your changes likely will not be seen in the wild for a few hours, perhaps as long as 3 days overseas. Keep that in mind when you're testing so you don't drive yourself nuts.

share|improve this answer
    
Lol thanks jdw, yes I am aware it says 1.1.1.1 and no its not actually my IP address. –  Touff Dec 6 '12 at 18:50
    
So you're good to go? If so, you should accept my response as an "answer". Thanks! –  jdw Dec 6 '12 at 22:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.