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

This is my first time setting up SPF records, so I'd just like some experienced eyes to make sure I'm doing this properly.

I have several domains, but I'll focus on one of them: propertysolved.com

I have one physical server which is my web server and mail server. Most mail for propertysolved.com will actually just be sent via Gmail, but the website running on my server will also send some emails so I want the SPF record to approve both of them.

propertysolved.com      A       66.135.39.18
propertysolved.com      TXT     v=spf a mx include:_spf.google.com ~all
propertysolved.com      MX      priority: 10    propertysolved.com

Does this look right?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

See http://www.openspf.org/SPF_Record_Syntax for the syntax to use when writing your SPF records.

Your SPF record should read v=spf1 +a +mx +include:_spf.google.com -all to have the greatest effectivity at blocking bounceback spam due to forged headers.

Additionally, if you're on some kind of shared hosting server, you should ask your hosting provider what IP address(es)? they use for outgoing email and add those to the SPF record using the ip4:, ip6:, or include: mechanisms (as appropriate). If your host is using a smarthost for outbound spam filtering, you should add that server's outgoing IP addresses as well using one of the mechanisms above as instructed by your hosting provider.

share|improve this answer
    
I don't see much SPF records with a hard fail (-all), it's usually a soft fail (~all). –  Alex Jan 10 '13 at 23:13
    
I'm still using the format I used above without the +s and using the soft fail, but your comment made me notice that I had v=spf instead of v=spf1 which was a serious problem with my entry. –  Kenny Wyland Jan 10 '13 at 23:15
    
v=spf was an issue indeed. –  Alex Jan 10 '13 at 23:17
add comment

It does look ok.

As long as your servers sending the email has the IP 66.135.39.18.

It's also redundant to put A and MX in your SPF in your case.

Since they are both pointing to the same IP.

On the other hand, if you are using Google Apps for your emails, your MX are wrong.

They should be pointing at Google's servers;

alt2.aspmx.l.google.com

aspmx2.googlemail.com

aspmx3.googlemail.com

aspmx.l.google.com

alt1.aspmx.l.google.com

share|improve this answer
    
I don't think I'm truly using Google Apps to send email. I've just configured my Gmail account to "Also send mail as..." I'm either using the Gmail web interface to send, or sending through postfix running on 66.135.39.18 –  Kenny Wyland Jan 10 '13 at 23:07
add comment

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.