Re: [Exim] Opinions sought: byname vs bydns for manualroute

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Peter Benie
Date:  
À: Philip Hazel
CC: exim-users
Sujet: Re: [Exim] Opinions sought: byname vs bydns for manualroute
Philip Hazel writes ("[Exim] Opinions sought: byname vs bydns for manualroute"):
>
> 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.


This reminds me of IRIX's nsd (equivalent to Sun's nscd). This may
have been fixed by now, but when I used it, nsd was unable to distinguish
not being able to look up a name (eg. a timeout) from a negative answer
(eg. NXDOMAIN). The result was that is reported all DNS failures as
negative responses and stored this incorrect negative response in its
cache. (I reported this to SGI, but as usual they failed to understand
the problem.)

Anyway, the point is that there's a reasonable chance that nscd is the
culprit. Try disabling it and doing your experiment again.

> 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.


I'm in favour of the change. I expect that configurations that fail
will typically be noticed fairly quickly, whereas using a broken
implementation of gethostbyname will result in occasional problems
that are hard to track down.

On the same topic, I don't think it's desirable to do any DNS lookups
at all in situations where the purpose of using "byname" was to look
in /etc/hosts. You could add a "byfile" method that parses /etc/hosts
(or some other file) directly.

Peter