spf-discuss
[Top] [All Lists]

Re: DNS gurus: What is the max length of a TXT rec ords?

2004-02-09 17:42:49
Individual strings in a text record can be no longer than 255 bytes, but the TXT RR itself can have any number of individual strings (up to the 64k DNS limit).

example.com IN TXT "string which is 255 characters..." "another string which is 255 characters..." "still another 255 character string"

Each string is limited to 255 bytes because DNS encodes strings with a leading unsigned length byte on the wire. In theory, you can have an unlimited number of strings up to the 64k total RR size limit, if you're willing to do TCP.

-- Jeff


wayne wrote on 2/9/2004 7:55 AM:

In <00c701c3ef24$6b3fa4a0$020a0a0a(_at_)patch> "Sam Norris" 
<Sam(_at_)ChangeIP(_dot_)com> writes:

No matter what any UDP DNS message can also be a max of 512 bytes ... Thus
the reason for the 255 char limit on TXT records.

Well, yes, but I guess I was assuming that you could have a text
record in the 450-500 byte range (depending on other DNS data).  Text
records that go beyond that size I had assumed would switch to TCP.

The point is that instead of having a recommendation that SPF records
SHOULD be well below 500 bytes, I have learned that SPF MUST be below
256 bytes.  And that means that AOL can't double the size of their SPF
record without breaking it up with include: mechanisms.


Maybe this isn't news to others, but it is news to me.


-wayne

-------
Sender Permitted From: http://spf.pobox.com/
Archives at http://archives.listbox.com/spf-discuss/current/
Latest draft at http://spf.pobox.com/draft-mengwong-spf-02.9.7.txt
Wiki: http://spfwiki.infinitepenguins.net/pmwiki.php/SenderPermittedFrom/
To unsubscribe, change your address, or temporarily deactivate your subscription, please go to http://v2.listbox.com/member/?listname(_at_)©#«Mo\¯HÝÜîU;±¤Ö¤Íµø?¡


-------
Sender Permitted From: http://spf.pobox.com/
Archives at http://archives.listbox.com/spf-discuss/current/
Latest draft at http://spf.pobox.com/spf-draft-20040209.txt
Wiki: http://spfwiki.infinitepenguins.net/pmwiki.php/SenderPermittedFrom/
To unsubscribe, change your address, or temporarily deactivate your subscription, please go to http://v2.listbox.com/member/?listname(_at_)©#«Mo\¯HÝÜîU;±¤Ö¤Íµø?¡