Knowledge - Details


SPF Record is too big
Date Added: 4/8/2015

SPF records have a limit of 10 DNS lookups.  They also have a limit of 255 character strings.

Too many DNS lookups?
If your record requires more than 10 DNS lookups, recipient servers are supposed to give a hard fail automatically.  To fix this, you have to either ask your service providers to shrink their SPF records to require fewer lookups, or you have to remove their includes and manually add their IP addresses to your SPF record.  That would mean that any time the service provider updates their SPF record, you would have to notice, and remember to manually update your own SPF record with their new IPs.  dmarcian has a useful tool to help you convert SPF records to a clean list of IP ranges: https://dmarcian.com/spf-survey/


Too many characters?  Use multiple records.
If your SPF record is longer than 255 characters, you can either split it into multiple records or split that one record into multiple strings.  If you are under your 10 DNS lookup limit, you could split your SPF record.  Just create a second SPF record and put half of the stuff in there.  Then edit your first record, remove the half that's in the second record, and add includes:spf2.yourdomain.com.


Too many characters?  Use multiple strings.
Or, to split the SPF record into multiple strings, just use quotes.  For example:

Instead of:
v=spf1 ip4:111.111.111.111 ip4:222.222.222.222 ip4:333.333.333.333 ip4:444.444.444.444 ip4:555.555.555.555.555 ?all
You can type:
v=spf1 ip4:111.111.111.111 ip4:222.222.222.222  ip4:333.333.333.333 ip4:444.444.444.444 ip4:555.555.555.555.555 ?all

NOTE: The strings are stuck together exactly as you typed them so make sure you include an extra space INSIDE the quotes so that the strings are joined together with a space between them.  See the space in my example above.

http://tools.ietf.org/html/rfc4408#section-3.1.3



Back to List

Disclaimer: Everything on this website is written for my own use. I disclaim any guarantees that the procedures and advice listed here are accurate, safe, or beneficial for anyone else. If you attempt to follow any procedures or advice shared here, you do it at your own risk. Part of IT work is knowing how to recover from problems.