Is there any technical limitation while working with SPF record?

0

Can I add more than one data center's IP subnet to my existing SPF records or is there some limitation with SPF in any case?

below is the sample SPF, this is not correct when you verify but this is the format only which I am using.

 dig p2k.01o.com TXT +short
 "v=spf1 mx ip4:74.98.180.0/24 ip4:84.88.81.0/24 ip4:48.171.60.0/24     ip4:81.11.11.0/24 ip4:9.10.16.0/23 -all

Pankaj Kumar

Posted 2017-03-28T19:33:42.533

Reputation: 45

Answers

1

You can add as many IP subnets as you want, but you should make sure that the total length of your SPF record is below 512 characters to avoid problems with DNS protocol limits.

The SPF record in the question looks syntactically correct. Some implementations may be confused by the multiple spaces between the 3rd and 4th ip4 mechanism, even if the specification allows this. And you should only include the mx mechanism, if the domain does have a mx record.

I have also taken a look at the real-life version of the SPF record, and while syntactically correct, it includes a lot of include mechanisms to records, that includes themselves. The self-including will result in evaluation errors. And the number of includes will most likely also result in hitting the DNS lookup limit, which will give in a permerror result.

Lars Lind Nilsson

Posted 2017-03-28T19:33:42.533

Reputation: 151