0

For a customer I would like to implement SPF for a lot of domains they own, but most of the IP's are the same. I would like to create something like for example Google, so I can use the include: record : _spf.google.com ~all

What to do to make this work right?

MadHatter
  • 78,442
  • 20
  • 178
  • 229
  • @MadHatter If your answer to that question included an example of proper use of `include`, I would vote to close as duplicate. Without such example I do not think it provides sufficient answer to this question. – kasperd Apr 13 '16 at 16:11
  • @kasperd the linked duplicate is a *canonical* question; improvements, if needed, should be made to it. – MadHatter Apr 13 '16 at 20:13

2 Answers2

1

Not tested but should work:

example.com TXT  "v=spf1 a mx ip:5.6.7.8/26 include:spf.yourdomain.com ~all"
example2.com TXT "v=spf1 a mx include:spf.yourdomain.com ~all"

and on your main, one domain:

spf.yourdomain.com TXT  "v=spf1 (multiple common values) -all"

You can add multiple entries (a mx), IP subnets and include. All SPF mechanisms can be used multiple times, separated by spaces. Of course it is your choice about ~all or -all etc (-all is much better, but you need test it first). Using include is nice, because later, if you need to make a change for SPF record for all domains (adding new IP, etc.) you need only change TXT record of "spf.yourdomain.com".

Jack
  • 156
  • 1
  • 5
  • This will work, the only change I would make will be the `~all` to `-all`. The original poster might not need the extra modifiers in the first example (a mx ip) - depending on whats in the other record. – Henry Apr 14 '16 at 18:15
0

you can easily generate here http://www.mailradar.com/spf/ and later validate http://www.kitterman.com/spf/validate.html

DisplayName
  • 262
  • 4
  • 14