Making a big SPF record
by Andrew Macpherson on Dec.03, 2009, under SPF the Sender Policy Framework
“Ok so how do I make a big SPF record? I’ve run over the size of a DNS TXT record.”
Well as I commented elsewhere you can’t simply have a bunch of records as only the first one received will be applied, and if the software notices there’s more than one it’ll throw a wobbly. You can however split your spf record up like this:
$ORIGIN X.com. @ IN TXT "v=spf1 a mx include:part1.x.com include:part2.x.com include:part3.x.com -all" part1 IN TXT "v=spf1 ip4:192.168.128.0/20 -all" part2 IN TXT "v=spf1 ip4:192.168.64.0/22 -all" part3 IN TXT "v=spf1 ip4:192.168.192.0/18 -all"
Of course if you’re setting up for a large multinational, then it’s sensible to make the included parts correspond to your national gateways so you can use the a and mx tags, and avoid having to set up separate SPF records for national presentation.