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

Top Page
Delete this message
Reply to this message
Author: Tor Slettnes
Date:  
To: Sherif Mohamed
CC: exim-users
Subject: Re: [Exim] Need Exim to ask hosts file before asking my DNS
On Apr 27, 2004, at 09:44, Sherif Mohamed wrote:

> When I try to send an email from Exim to my second email server, I
> find in
> the logs that it is trying to connect to the real IP, although I set
> the
> virtual IP in /etc/hosts


That's because it will perform an MX lookup, then an A lookup of the
resulting name. So if the MX reads, say, "mail.yourdomain.com", then
you need to add an entry for "mail.yourdomain.com", rather than
"yourdomain.com", in your /etc/hosts.

A better way is to write a specific router in Exim to take care of
these deliveries. You want to use the "manualroute" driver, "domains =
yourdomain.com", and "route_list = * smtp-server".

-tor