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: exim-users
Subject: Re: [Exim] Need Exim to ask hosts file before asking my DNS
On Thu, 6 May 2004, Sherif Mohamad wrote:

> I tried it now after your advise, yes it show it is trying to the real IP
> not the virtual one (behind the firewall), it used gethostbyname to get the
> MX of the domain, so it got the host name, but when trying to get the IP of
> that hostname, it used the DNS again !!


[snip]

> original hostlist=$domain/MX options=byname
> expanded hostlist="menanet.net/MX" options=byname
> set transport remote_smtp
> finding IP address for menanet.net/MX
> doing DNS MX lookup for menanet.net/MX
> DNS lookup of menanet.net (MX) succeeded
> DNS lookup of mnaccounts.menanet.net (A) succeeded


I'm sorry. I was being stupid. If you specify /MX in list of hosts, you
are *asking* for a DNS lookup to be done, because that is where MX
records are found (you can't have MX records in /etc/hosts). So the
"byname" setting is not relevant, and is ignored. (Often a nameserver
returns the A records with the results of an MX query, so a second DNS
lookup is not needed.)

I will clarify the manual next time I update it.


--
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