On Sun, 18 Nov 2001, Paul M Foster wrote:
> > You never actually posted the router and transport you are using. If you
> > had done that, people on this list could probably say why it was using
> > different hosts in the different cases.
> >
>
> Alrighty then, it follows, in the main.
Paul also sent this message to me as a personal message. I had already
answered it before I noticed that he has also posted it to the list.
(Please don't send separate messages like that, folks. It just confuses
me. :-)
For the record, here is my reply:
On Sun, 18 Nov 2001, Paul M Foster wrote:
> # TRANSPORTS CONFIGURATION - ORDER DOES NOT MATTER
>
> remote_smtp:
> driver = smtp
> hosts = smtp.quillandmouse.com
> # hosts_override
> # ROUTERS CONFIGURATION - ORDER MATTERS
>
> smart_route:
> driver = domainlist
> transport = remote_smtp
> route_list = * smtp.quillandmouse.com byname
That explains all.
As it stands, the "hosts" option in the transport is ignored, because
the hosts are set up by the router. The name "smtp.quillandmouse.com" is
passed to the gethostbyname() function, because you have set "byname".
Unless you have that host in your /etc/hosts, a DNS lookup for address
records will be done. This is what the DNS contains:
smtp.quillandmouse.com. A 207.155.248.12
smtp.quillandmouse.com. A 207.155.248.31
smtp.quillandmouse.com. A 207.155.248.4
smtp.quillandmouse.com. A 207.155.248.7
If you uncomment "hosts_override", the "hosts" option in the smtp
transport takes over, overriding what the router has found. However,
because you have *not* set "gethostbyname" in the transport, the DNS
lookup starts by looking for MX (mail exchange) records. What the DNS
contains is
smtp.quillandmouse.com. MX 10 irresistable.cnchost.com.
smtp.quillandmouse.com. MX 8 inflexible.cnchost.com.
smtp.quillandmouse.com. MX 8 indefatigable.cnchost.com.
smtp.quillandmouse.com. MX 10 invincible.cnchost.com.
irresistable.cnchost.com. A 207.155.248.34
inflexible.cnchost.com. A 207.155.252.24
indefatigable.cnchost.com. A 207.155.248.27
invincible.cnchost.com. A 207.155.248.15
As you can see from the IP numbers, this is a completely different set
of hosts.
The fact that "hosts" in the smtp tranport does MX processing is rather
an oddity. It dates from the very early days of Exim. In the forthcoming
Exim 4 release, this behaviour has been changed so that MX processing is
no longer used. That will get rid of this particular "gotcha".
Philip
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.