TXT Record Format with multiple records?

Mark Andrews marka at isc.org
Sat Oct 12 07:14:21 UTC 2013


In message <CAH8yC8mWS=KypSkA2qV2R-STCTw_mHHYPrN42aa_cM1Y7+0R6Q at mail.gmail.com>
, Jeffrey Walton writes:
> > plugh.example TXT "foo" "bar"
> >
> Thanks John.
> 
> So I'm clear: (1) there is only one TXT record per host;

No.

> (2) multiple TXT records are not allowed;

No.

and (3) the individual character strings are delimited with the quote
character.

Yes and no.
 
> Related: is there an escape character so a quote can be present in the
> character-string?

Yes,  back slash.
 
> Related: is the single quote also accetped? What happens if the string
> is "Knuth said, 'random numbers should not be generated with a method
> chosen at random.'"
> 
> Finally, is there a standard document that calls the convention out?

Yes.  RFC 1035 Section 5.1. Format.

<character-string> is expressed in one or two ways: as a contiguous set
of characters without interior spaces, or as a string beginning with a "
and ending with a ".  Inside a " delimited string any character can
occur, except for a " itself, which must be quoted using \ (back slash).

Which is combined with the following to allow any 8 bit character
and to allow back slash to exist in a character-string.  Note the
escape conventions are not the same a in C.

\X              where X is any character other than a digit (0-9), is
                used to quote that character so that its special meaning
                does not apply.  For example, "\." can be used to place
                a dot character in a label.

\DDD            where each D is a digit is the octet corresponding to
                the decimal number described by DDD.  The resulting
                octet is assumed to be text and is not checked for
                special meaning.

Mark
 
> Please forgive my ignorance, and sorry about all the details. I have
> not been able to find a detailed specification.
> 
> Jeff
> 
> 
> On Sat, Oct 12, 2013 at 12:52 AM, John Levine <johnl at iecc.com> wrote:
> >>How, precisely, is the second (or third) string added?
> >
> > plugh.example TXT "foo" "bar"
> >
> _______________________________________________
> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe
>  from this list
> 
> bind-users mailing list
> bind-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/bind-users
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: marka at isc.org


More information about the bind-users mailing list