-1

I would like to allow an email service to be a valid sender for my domain. This service has dedicated a single IP for my account.

Instead of:

v=spf1 ip4:1.2.3.4 -all

Will the following behave the same assuming I have a host record corresponding to the IP address?

v=spf1 include:service.domain.com -all

*edited to correct -all syntax

0

2 Answers 2

3

As a preamble there's (almost) no point of using a spf if it is with a "~all". You shoud use "-all".

As for the "include" statement, it is used to "add" to your spf another existing spf record.

I.E. the spf record, if it exists, of the domain listed in the include will be evaluated as well as the remaining of your spf.

You can use the "a" syntax to evaluate a DNS name instead of an IPv4 address.

So you may use:

v=spf1 a:service.domain.com -all
2
  • +1 for the very correct objection to ~all.
    – MadHatter
    Sep 10, 2015 at 16:33
  • Thanks! This is exactly what I needed. I feel pretty stupid about the ~all thing
    – Jaxaeon
    Sep 10, 2015 at 17:55
0

the include: option will search for SPF records at the specified domain name.

I think you are looking for a: option like:

v=spf1 a:service.domain.com ~all

Also there are numerous online tools to verify your SPF records in a more human readable way.

Not the answer you're looking for? Browse other questions tagged .