The default option for looking up hosts in a manualroute router is
byname (as opposed to bydns). I chose this because I thought that if
people were routing domains manually, they probably would want the
lookup to include /etc/hosts (and maybe other local sources) as well as
the DNS, so Exim should use gethostbyname() (or getipnodebyname() in
IPv6 systems) rather than just do a DNS lookup.
It turns out there are two problems with this when there is a DNS
timeout:
1. I had a brain fade when I implemented it, and thought that because
the "fail" return from gethostbyname() was NULL, you couldn't tell
the difference between "no such host" and "DNS timed out". I hadn't
noticed the h_errno variable. The development code now looks at its
value, and distinguishes between HOST_NOT_FOUND and TRY_AGAIN
(exactly as it does for a direct DNS lookup).
2. However, it turns out that on my test system (Solaris 8), this
doesn't help. I found an example of a domain which times out if
looked up in the DNS, but for which getipnodebyname() returns NULL
with h_errno set to HOST_NOT_FOUND.
So, the question is: Should the default for manualroute be changed from
byname to bydns? This would be an incompatible change. It would cause
problems for any configuration that relies on the default to look up
hosts in local sources such as /etc/hosts. On the other hand, it would
avoid the problem described above. It would also mean that all routers
and transports use the DNS by default, which is a consistency that I
should have thought about, but didn't.
Views?
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.