[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: exim and /etc/hosts



On Sun, 16 Jan 2000, Dave Sherohman wrote:

> However, byname still does a DNS check instead of just finding the hostname
> in /etc/hosts and going with that.  (Yes, it appears that I've got my system
> configured correctly to use /etc/hosts - ping, ftp, telnet, ssh, and
> everything else I've tried will go from one machine on my network to another
> whithout trying to contact DNS.  Only exim refuses to cooperate.)  Can exim
> be told to look in /etc/hosts and skip the DNS lookup?  If so, how?

Once it finds it in /etc/hosts it should stop looking. Make sure the
hostname you have listed in the exim router is the same as the FIRST
hostname you have listed in /etc/hosts

Example:

routelist="*.somedomain.com mailhub.somedomain.com byname"

/etc/hosts should then have:

1.2.3.4	mailhub.somedomain.com mailhub

If exim.conf looks like:

routelist="*.somedomain.com mailhub byname"

/etc/hosts would have to look like:

1.2.3.4 mailhub mailhub.somedomain.com

The FIRST name after the IP address is one that matters most.

Also make sure the /etc/host.conf file looks like:

order hosts,bind
multi on

And /etc/nsswitch.conf like for hosts: looks like:

hosts:          files dns

Make sure files comes before dns

I am using this here and it works fine for me.





Reply to: