[Pdns-users] Multipart TXT records

Julian Mehnle julian at mehnle.net
Mon Mar 1 19:25:57 UTC 2010


Leen Besselink wrote:

> You can also see that here:
>
> http://doc.powerdns.com/changelog.html
>
> I'm unsure about what it does mean though.
>
> My first thought would be that it's code to split large TXT-records
> over different TXT-records.
>
> Or just that multi TXT-records didn't work at all, a bug, as mentioned
> in the log.

I think pre-2.9.21, multi-"part" TXT records didn't work at all.

Actually, RFC 1035 defines a TXT RR to be composed of "One or more 
<character-string>s" (not "parts", and a <character-string> as:

    "a single length octet followed by that number of characters.
    <character-string> is treated as binary information, and can be up
    to 256 characters in length (including the length octet)".

Thus the rationale for having more than one (character) strings in a 
single TXT RR is to build a TXT RR that is longer than 255 characters.

The way TXT RRs work in the PowerDNS authoritative server is that each of 
a TXT RR's strings must be enclosed in double quotes, even if the TXT RR 
consists of only a single string.

E.g.:

  "foo bar quux"  (single string)

  "foo " "bar " "quux"  (three strings)

Those values still need to be quoted when specified in an SQL command.  
E.g.:

  INSERT INTO dns_records (name, rrtype, content) VALUES (
    'txt.example.com', 'TXT', '"foo bar quux")

  INSERT INTO dns_records (name, rrtype, content) VALUES (
    'txt.example.com', 'TXT', '"foo " "bar " "quux"')

-Julian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20100301/00d0bae5/attachment-0001.sig>


More information about the Pdns-users mailing list