Re: [exim] Email DNS Issue

Top Page
Delete this message
Reply to this message
Author: Phil Pennock
Date:  
To: Pete McEvoy
CC: exim users, W B Hacker
Subject: Re: [exim] Email DNS Issue
On 2008-03-15 at 08:46 +0000, Pete McEvoy wrote:
> This isnt the case on any of the linux boxes I run exim on, exim does a
> MX lookup first.
> In fact I cant get it to look in /etc/hosts at all.


That's controlled by an option.
14.23 Alphabetical list of main options

If you tell Exim to use gethostbyaddr() first _and_ if
/etc/nsswitch.conf (or whatever) says to use hosts before dns, only then
will your Exim use /etc/hosts first.

Extract below.
-Phil

-----------------------------------------------------------------------
-host_lookup_order-Use: main-Type: string list-Default: "bydns:byaddr"-
-----------------------------------------------------------------------

This option specifies the order of different lookup methods when Exim is trying
to find a host name from an IP address. The default is to do a DNS lookup
first, and then to try a local lookup (using gethostbyaddr() or equivalent) if
that fails. You can change the order of these lookups, or omit one entirely, if
you want.

Warning: The "byaddr" method does not always yield aliases when there are
multiple PTR records in the DNS and the IP address is not listed in /etc/hosts.
Different operating systems give different results in this case. That is why
the default tries a DNS lookup first.