DNS and qmail : CNAME failure

Steinar Haug sthaug at nethelp.no
Mon Jun 28 19:34:42 UTC 1999


[Murray Walker]

|   I have a problem getting mail delivered to my site cstr.ed.ac.uk from
|   sites that use qmail - seems to be ok with mail from sendmail, etc
|   sites.
...
|   The cname lookups are performed on the MX values which, in turn, are
|   liddell.cstr.ed.ac.uk and mailrelay.ed.ac.uk which are both actual
|   addresses, not cname's, so the cname query obviously fails. So why does
|   qmail screw up? Any ideas? After mailing the qmail discussion list I got
|   a reply suggesting that our records were > 512 bytes which would caused
|   qmail to fail. Is this an issue if there are no cname records for those
|   hosts? If it is, is there a way to reduce the size of the record?

qmail does an ANY lookup of cstr.ed.ac.uk as part of the name resolution
process - see routine dns_cname() line 242 in dns.c in qmail-1.03. If you
do an ANY lookup of cstr.ed.ac.uk you'll see that it returns a result of
895 bytes. The qmail buffer is 512 bytes, and it bails out. This is well
known, and is mentioned prominently on the qmail page at

	http://www.qmail.org/top.html

where a patch is also given. However, it's unlikely that you'll get all
qmail installations to change this right away. Looking at the result of
the ANY query, I see you have 7 lines of TXT records for a total of 269
bytes of TXT. This may not be such a great idea. You also have six name
servers, several of which have two IP addresses. All of this results in
a large answer to the ANY query. If you could cut down this a bit, your
problems with delivery from qmail sites would disappear.

(Personally, I believe this is going to be an increasingly common problem,
and that the qmail default will have to change. But that won't help you
right now...)

Steinar Haug, Nethelp consulting, sthaug at nethelp.no


More information about the bind-users mailing list