Re: [Exim] Need Exim to ask hosts file before asking my DNS

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Sherif Mohamad
CC: Matthew Byng-Maddick, exim-users
Subject: Re: [Exim] Need Exim to ask hosts file before asking my DNS
On Wed, 5 May 2004, Sherif Mohamad wrote:

> Unfortunatly this didn't work:
>
> mydnslookup:
> driver = manualroute
> route_list = * $0/MX byname;
>
> I wanted Exim to get the hostname from /etc/hosts not directly from the DNS
> because I have about 800 domains behind a firewall, I do not want to put all
> their names in the config of Exim.
> $0 should be the domain name, $0/MX should mean the host that is configured
> in the DNS as MX of that domain, and byname means ask the local system (to
> look at /etc/hosts) to get the IP of that host not direct to the DNS.
>
> This works ok for external domains, but internal domains, still Exim can't
> contact my internal hosts to send the email.


1. Have you tried $domain instead of $0? (Just in case $0 is broken.)

2. "byname" causes Exim to call "gethostbyname". Whether that looks at your
/etc/hosts or the DNS or both depends on your nsswitch.conf settings.

3. Have you tried running a routing test using -bt -d to get debugging
output to see what Exim is actually doing?

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book