Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to set up a SPF record to allow an alternative IP address to send our newsletter emails. The main IP hosting the site still needs to be allowed to send email also.

Would the following work?

v=spf1 mx ip4:_MAINSITE_ mx:mail._MAINSITEDOMAIN_ ip4:_ALTIP_ -all
share|improve this question
I'm not really familiar with SPF, but I did find an online SPF record tester via Google. Maybe it'll be of some use to you. – Ilmari Karonen Apr 24 '12 at 19:28

I recently had to do something similar and I know that Microsoft provides a SPF Record Wizard on their website. Maybe it will help you also.

share|improve this answer

You don't need to specify the details of your mx records. The correct format would be:

v=spf1 mx ip4:_MAINSITE_ ip4:_ALTIP_ -all

This would allow mail from your two IPs and any mail servers in your mx records

share|improve this answer

Adding a ~all (SOFTFAIL) instead of -all (FAIL) may be useful if in the future, you change some of your IP, this way it will not fail if you don't change the SPF record at the same time with the IP.

share|improve this answer

Your Answer


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.