<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">7. okt. 2026 22:54:36 Felipe Gasper <felipe@felipegasper.com>:</span>
<br>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">></span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">></span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>> On Oct 7, 2026, at 2:08 PM, Håkon Alstadheim <hakon@alstadheim.priv.no> wrote:</span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>></span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>></span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>> Den 07.10.2026 19:32, skrev Felipe Gasper:</span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>>>> On Oct 7, 2026, at 12:17 PM, Håkon Alstadheim via net-dns-users <net-dns-users@lists.nlnetlabs.nl> wrote:</span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>>>></span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>>>></span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>>>> Den 07.10.2026 18:07, skrev Håkon Alstadheim:</span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>>>>> Den 07.10.2026 01:38, skrev Doug Barton via net-dns-users:</span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>>>>>> …</span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>>>>> Sorry I'm having such a hard time getting this across, my presentation was probably confusing because I've tried many of the various ways to get at the txt contents.</span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>>>>></span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>>>> Looks like I mixed my examples again. First example, with quotes on *some* for the chunks and others naked, is from using rdstring, txtdata gives just extra spaces.</span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>>> Every TXT record is a *list* of strings, each capped at 255 bytes.</span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>>></span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>> I know this.</span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>>> Any application that models TXT record as a single string must define logic for splitting & joining across the TXT record’s individual pieces.</span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>>> DKIM, for example, (IIRC) simply joins the segments end-to-end.</span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>>></span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>>> Scalar-context Net::DNS::RR::TXT::txtdata(), on the other hand, joins the segments with a space.</span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>></span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>> Fine, so I should work with rdstring, which *should* return the segments in "quotes", except that *one* segment gets printed unquoted! So programmatically glueing it together becomes rather random.</span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>></span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>> "v=spf1 [...totally fine string...]ip4" ":160 [...totally fine string...]include:478860" 1.spf03.hu "bspotemai[...totally fine string...]p.com -all"</span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>></span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">>> What is 1.spf03.hu doing unquoted?</span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">></span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">> Going by the documentation, rdstring() is defined (on the base class, not on ::TXT) as just “a string representation of the RR-specific data”. It doesn’t seem to define a quoting mechanism, or even guarantee that the returned string is round-trippable.</span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">></span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">> Are you able to do the quoting yourself? That might solve the issue.</span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">Maybe I can rely on my *guess* (realized just recently) that strings with spaces will be double-quoted, and any naked text is a segment without spaces to be used verbatim until the next space, I gess I'm good. I think actual double-quotes are illegal in spf1. If those two things hold, I'm good. I'll try it and see :) .</span>
<br>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">></span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">> Alternatively, LDNS might be closer to what you want.</span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">></span>
<br>
<span dir="ltr" style="margin-top:0; margin-bottom:0;">> -FG</span>
<br>
<br>
</body>
</html>