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.

I use a different server to send mail to my mailing list. I want to add an SPF record to my domain to show that the IP of the different server is authorized to send mail (as well as the default server).

The server sending email in the example is 1.2.3.4 with the main domain of test.co.uk.

So far I have v=spf1 mx a ip4:1.2.3.4/32 mx:test.co.uk ?all, would this work for what I want?

EDIT: I would be sending mail using sendmail. The SPF record would be to increase % of mail going to inbox and also so we can enforce -all in the near future on SPF.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

I'm not sure why you have /32. Try just:

v=spf1 mx a ip4:1.2.3.4 mx:test.co.uk ?all
share|improve this answer
    
Is it 'safe' to try this? It's a busy site. –  Stephen Adrian Rathbone Apr 19 '12 at 15:47
    
Yes, it's safe. You're including the domain's MX and A records, the other IP and the other MX, and setting all other hosts to 'neutral'. This should not have a significant effect on delivery rate. –  xofer Apr 19 '12 at 15:51
    
Also, to be clear, the mx:test.co.uk part is allowing the MX record of test.co.uk. If it's just the one machine (at 1.2.3.5) you can leave off the mx:... part. –  xofer Apr 19 '12 at 15:54

Having ?all at the end will not cause much difference: the SPF rule is neutral. So sending mail from a server not mentioned will continue to be accepted so any change is safe. It's basically just points out that servers mentioned in the SPF are confirmed as trusted.

You can also use the include mechanism if the sending domain is configured correctly. This would mean that you can add include:test.co.uk and all SPF rules set for test.co.uk will be included.

This is useful if you test.co.uk may change the way it sends emails by outsourcing, etc... It also means that you only need to make the change for the spf records of test.co.uk. If using a third party email solution, their spf records could be already set up correctly.

So for example, this would mean your SPF record would be:

v=spf1 mx a include:test.co.uk ?all

while test.co.uk would have a SPF record similar to the one you mentioned:

v=spf1 a mx ip4:1.2.3.4 ?all

My usual resource for anything relating to SPF is the website http://www.openspf.org.

share|improve this answer

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.