Re: Configuring Exim for mail delivery
On Sat 01 Oct 2016 at 22:36:09 +0900, Mark Fletcher wrote:
> On Sat, Oct 01, 2016 at 01:56:40PM +0100, Brian wrote:
>
> > The thing for Mo to grasp is that exim *always* does an MX lookup, often
> > using the ISP's DNS server. user@server will fail (as has been found
> > out) because the domain "server" is not in the DNS.
> >
> > /etc/hosts is not consulted when the lookup is done. exim can be made to
> > look at /etc/hosts but for such a simple setup it is not worth the
> > effort and would likely lead to a world of pain.
> >
I hope we are not talking at cross-purposes. I was explicitly addressing
the issue of why an entry in /etc/hosts for machines on the network will
not replace a hubbed_hosts file.
> With great respect I think that confuses the issue. A DNS lookup will
> *not* explicitly get done by exim4 if the target domain is in
> hubbed_hosts, or if exim4 has been told it is the local domain. The
A hubbed_hosts file is for overriding or augmenting MX information from
the DNS (exim4-config_files). If you had
lists.debian.org: 91.221.168.152
the DNS would not be used and any mail to debian-user@lists.debian.org
would go to 91.221.168.152. MX information would be overriden.
With
server: 192.168.5.100 or server: server.local
MX information is augmented.
> point is one wishes to PREVENT a DNS lookup that is doomed to fail, and
No. The point is you want to override or augment MX information. Ok, a
DNS lookup is prevented but it is not because it is one which is doomed
to fail. A lookup on lists.debian.org would succeed but for some reason
the user wants the mail to go to 91.221.168.152.
> one does so for machines that are not the machine-local domain by
> putting them in hubbed_hosts, which will cause exim4 to throw out a
> connection request for the local network infrastructure (starting with
> the network infra on the local machine) to handle, without doing an
> explicit DNS lookup. That is handled by /etc/hosts if it is populated,
> and by Avahi if it is present and /etc/hosts is not populated, and no
> doubt by a few other alternatives I am not familiar with as well. If
> none of them succeed, the delivery will fail, because if I recall
> correctly hubbed_hosts router config ends with no_more which prevents
> other routers having a go.
exim does not use /etc/hosts; user@server will fail with '192.168.7.88
server' in it. user@server,local succeeds because server.local is in the
DNS.
--
Brian.
Reply to: