[Qmail-it] CNAME lookup failed temporarily

Davide davide at uniweb.it
Fri Apr 27 11:05:49 CEST 2007


Ho cercato negli archivi della lista e non ho trovato niente riguardo al "problema" del limite sulle dimensioni delle risposte DNS. Vi riporto quanto scritto a riguardo su lifewithqmail.org:

5.10.2. DNS
Historically, DNS responses have been limited to 512 bytes. Some large sites have started returning MX responses longer than that. qmail and many other programs have a problem with Domain Name Server (DNS) queries that return very large results. There are two ways to fix this in qmail and one workaround that might be sufficient for some applications.

5.10.2.1. Christopher K. Davis' patch, http://www.ckdhr.com/ckd/qmail-103.patch
This is an adaptation of a patch by Chuck Foster that should work with any resolver library, no matter how old, and uses a guard byte to avoid the "number of bytes placed in the buffer" library bug. It reallocates only once, to 65536, rather than just to the size needed, so it can be less memory-efficient than Chuck's patch (though, like his patch, it only reallocates if the response is larger than PACKETSZ, which defaults to 512 bytes). After reallocating, it forces a TCP query, rather than requiring the resolver library to do so (avoiding an extra round-trip between qmail and the name server, though if they're on the same machine or local network this is not a big worry).

5.10.2.2. Bump the packet buffer size up to 65536
Works with recent BIND resolver libraries, which will automatically do a TCP query within the library code if the reply comes back with the truncation bit set. This is the simplest fix, though it's also potentially the most wasteful of memory, depending on how your system handles paging. To do this, just replace PACKETSZ with 65536 in dns.c and rebuild qmail.

5.10.2.3. Run dnscache from djbdns
dnscache is, as the name implies, a caching DNS server. It knows how to handle large DNS responses and removes unnecessary information from them, so the response it returns is usually much smaller than the direct response. It also generally improves DNS lookup performance for all services that use DNS. Because it doesn't require patching qmail, this might be an acceptable workaround. Unfortunately, it's not a complete fix because responses can still be too large for qmail. See the djbdns section under Related Packages for more information.


Ho bisogno di adottare una delle precedenti soluzioni, quindi mi piacerebbe avere un vostro parere: quale metodo utilizzate/consigliate? Controindicazioni? Commenti? :-)


Grazie
Ciao
Davide




More information about the Qmail-it mailing list