[Pdns-users] PowerDNS returns a malformed response when queried for a TXT record larger than 257 characters.
julian at mehnle.net
Thu Mar 25 01:20:53 UTC 2010
> The problem is that while a TXT record can contain multiple "strings"
> (the parts you have to enclose in double quotes in TXT records in both
> BIND and PowerDNS), each string can only be 256 bytes long at maximum
> by design -- one length octet plus 255 bytes of text (RFC 1035). If
> you want to have a longer TXT record, you have to split it into several
> strings, like so:
Oh, and be aware that responses to DNS queries via UDP will also be UDP
packets and, in the absence of EDNS0, will typically be limited
(truncated) to 512 bytes. Some resolver libs (and, by extension, SPF
implementations) will notice the truncated (TC) bit and make another
query via TCP to get the entire record, but some won't. So it's best to
keep an SPF record short enough to fit into a 512 bytes UDP packet:
If necessary you can have several SPF records for different DNS names,
chained together using "include:".
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: This is a digitally signed message part.
More information about the Pdns-users