[net-dns-users] Bug with large txt RR ?

Doug Barton dougb at dougbarton.us
Tue Oct 6 16:13:45 UTC 2026


You're incorrect about what is coming from dig:

"v=spf1 ip4:193.203.229.121 ip4:193.203.230.121 ip4:212.197.238.154 
ip4:212.197.238.155 ip4:212.107.69.73 ip4:212.107.69.74 
ip4:212.107.69.75 ip4:212.197.238.110 ip4:212.107.68.113 
ip4:212.197.238.101 ip4:46.34.83.109 ip4:46.34.84.110 ip4:185.75.168.80 ip4"

":160.92.108.0/24 ip4:160.92.141.0/24 ip4:160.92.140.0/24 
ip4:160.92.177.0/24 include:ppb.worldline-solutions.com 
include:customers.clickdimensions.com include:spf.dynect.net 
include:_customers.moreover.com include:spf.protection.outlook.com 
include:478860"

"1.spf03.hu"

"bspotemail.net  include:euronext.emailwarp.com -all"

The content is broken up into 255 character chunks, just like the 
protocol demands. :)

Why there is a separate block for the "1.spf03.hu" bit is anyone's 
guess, but it's probably in the zone file itself as a misguided attempt 
to try to break the content up.

Quite simply, this SPF record is poorly formatted, and needs to be 
refactored.

Good luck,

Doug


On 2026-10-06 10:55 AM, Håkon Alstadheim via net-dns-users wrote:
> Hi all. New to the list, sorry if this has already been asked and 
> answered, skimmed the archives, but I might have missed something. Note: 
> I'm not showing the output here, some spam-filter refused to forward my 
> initial attempt at this mail, trying without the dumps.
> 
> I'm getting txt RRs for euronext.com, looking for the v=spf1 record. I 
> get a split record, shown as dumped from Dumper.
> eg if you run:
> --- shell input ---
> # perl -MNet::DNS -MData::Dumper -e '
> $host="euronext.com";
> my @txt2 = rr("$host","txt");
> foreach $rr (@txt2){
>   if($rr->rdstring =~ m(^.?v=spf1)){
>    print "dumping spf perl rr for euronext.com:\n";
>    print Dumper(\$rr);
>    print "\n--\n";
>    print "========\n";
>    print "txtdata:|" . $rr->txtdata . "|\n";
>   }
> }
> '
> --- shell input ends ---
> When getting the text value by 'print $rr->rdstring' (not shown), the 
> quoting is messed up at the 511th character. $rr-txtdata is likewise 
> messed up, it splits at the problematic point "include:478860 
> 1.spf03.hu" has a space where there should be none. This I can work 
> around, but it feels very untidy :).
> 
> Using dig, does not show the same problem, e.g.:
> --- code ---
> $ dig euronext.com txt | grep 'v=spf1'
> --- /code ---
> 
> I'd love to provide a patch, but the decoding done in the perl module is 
> beyond my ken. Help, anyone ?
> 
> ---
> Kind regards, Håkon Alstadheim
> _______________________________________________
> net-dns-users mailing list
> net-dns-users at lists.nlnetlabs.nl
> https://lists.nlnetlabs.nl/mailman/listinfo/net-dns-users



More information about the net-dns-users mailing list