Multiple SPF records for multiple domains

36,349

You can only have one SPF record (https://www.rfc-editor.org/rfc/rfc4408#section-3.1.2).
You need to combine them like so:

v=spf1 include:spf.mandrillapp.com include:spf.protection.outlook.com -all

or

v=spf1 include:spf.mandrillapp.com include:spf.protection.outlook.com ?all
Share:
36,349

Related videos on Youtube

Oscar Szumiak
Author by

Oscar Szumiak

Updated on September 18, 2022

Comments

  • Oscar Szumiak
    Oscar Szumiak almost 2 years

    We have recently started using Office 365 for our email, which requires us to add a DNS TXT record with the value v=spf1 include:spf.protection.outlook.com -all. We already have an SPF record with the value v=spf1 include:spf.mandrillapp.com ?all for Mandrill, an SMTP sender we also use.

    enter image description here

    My concern is this might cause some conflict. Is my concern valid or will be be fine with these two SPF records?

  • Adrian Salazar
    Adrian Salazar over 9 years
    I'm in exactly the same position here... of implementing line 1 or line 2... whats the difference between -all and ?all
  • faker
    faker over 9 years
    @AdrianSalazar -all: mails sent from hosts not specifically allowed are not permitted to send mails. ?all: means any not specified host is neutral and nothing can be said about the validity of it. In practice it is not sent to spam. ?all renders the SPF record almost useless. However some 3rd party provides want you to use it because they change IPs often and don't want that to cause problems.
  • Ishan Sharma
    Ishan Sharma almost 8 years
    "You can only have one SPF record." That is clearer than the message I got: " Office 365 ondersteunt slechts één SPF-record" (Office365 only supports 1 SPF-record". It suggested (the way I've read it) like other parties support multiple SPF records, but Office365 doesn't. But as I read your post it's normal just to support 1 SPF record.
  • blaughw
    blaughw almost 8 years
    Indeed, each recipient service has a bit of room in the SPF spec in how they want to handle hardfail, softfail, etc. if Office 365 receives a message, it will only perform one SPF lookup. It also has a configurable option on how to handle SPF hardfail.