Add to Favourites Add to Favourites    Print this Article Print this Article

Long TXT records are broken into strings on multiple lines

As bind (named) has a line length limit, the dns system does allow for multi-line records.
We make use of this feature because with long DKIM keys, they wouldn't fit on one line, as they'd be too long.

This is the change to DA where we enabled multi-line records:
http://www.directadmin.com/features.php?id=1387

For example, the DKIM TXT record we use for directadmin.com looks like this in the db file:

x._domainkey    14400   IN      TXT     ( "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApxJI+ldB/P7ocCsU4MjgC0iK+sIQ2g1Ft1RG3LuqquzaY8dmK+SsLVQi8uuo8t7DzAhsAGcHgHNOi189twbtQEz"
                                       "4R3KOLhESd3xGUYP0FTvyejDOaAeZzvjCzI6oj42Y0pNDRrmuOgAd61qJy46+smfKc+QrI4E1DGHnjrlXzrsBK73DMqX9JuD9oGRaXDghakGdAebBjNcRsZfjIv84DPmrHE9/nqacqUnpK8Z71jAEc"
                                       "nklPIfC6LNmrWPzG7+6fN+LbAAUSjvXGw0GpB6EkhRsrcSwilE+vPe+S42aE4dBCvAbLjcZgJIA/gVqnNlm8jfL8qshXpQjIUObfd+o4wIDAQAB" )

and the output of the DNS lookup looks like this:

[root@jbmc-software public_html]# dig TXT x._domainkey.directadmin.com +short
"v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApxJI+ldB/P7ocCsU4MjgC0iK+sIQ2g1Ft1RG3LuqquzaY8dmK+SsLVQi8uuo8t7DzAhsAGcHgHNOi189twbtQEz" "4R3KOLhESd3xGUYP0FTvyejDOaAeZzvjCzI6oj42Y0pNDRrmuOgAd61qJy46+smfKc+QrI4E1DGHnjrlXzrsBK73DMqX9JuD9oGRaXDghakGdAebBjNcRsZfjIv84DPmrHE9/nqacqUnpK8Z71jAEc" "nklPIfC6LNmrWPzG7+6fN+LbAAUSjvXGw0GpB6EkhRsrcSwilE+vPe+S42aE4dBCvAbLjcZgJIA/gVqnNlm8jfL8qshXpQjIUObfd+o4wIDAQAB"
[root@jbmc-software public_html]#

where you'll note that dig does return multiple strings in the result, but this is normal.

If a program is doing a check on this type of record value, it's up to that program to assemble the string into one long value.
For example, exim uses this string, and does know how to assemble the value.

Some other URLs describing multi-line TXT records:
http://www.zytrax.com/books/dns/ch8/txt.html
http://razzed.com/2009/03/05/dkim-txt-records-in-dns-exceeding-255-characters/
http://superuser.com/questions/657789/format-of-txt-data-in-dns-record

Was this answer helpful?

Also Read