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

Top Page
Delete this message
Reply to this message
Author: Sherif Mohamad
Date:  
To: Matthew Byng-Maddick, exim-users
Subject: Re: [Exim] Need Exim to ask hosts file before asking my DNS
> > I think /etc/nsswitch is correct, as I ping can resolve correctly, also
> > telnet.
> > They lookup in the hosts file first.
> > But Exim don't, I see it trying to connect to the correct hostname but

with
> > the real IP in the logs.
>
> If you're just treating it as a random external host, you'll need to tell

it
> to do a gethostbyname with a manualroute router rather than using the
> dnslookup router, which will always try the MX first (and therefore will
> always use DNS).


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.


>
> MBM
>
> --
> Matthew Byng-Maddick          <mbm@???>

http://colondot.net/
>                       (Please use this address to reply)

>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim

details at http://www.exim.org/ ##
>
>
>