On Mon, Nov 27, 2000 at 01:08:17AM +0100,
Moritz Schulte <tux@???> is thought to have said:
> "Tabor J. Wells" <twells@???> writes:
>
> > Does your /etc/nsswitch.conf contain a line for hosts which puts "files"
> > before "dns" and does your /etc/hosts contain the proper entries for the
> > hosts in question?
>
> Yes to both questions.
> My /etc/hosts has the following entries:
>
> 127.0.0.1 localhost localhost
> 192.168.0.1 orion.sc orion
> 192.168.0.2 gryffindor.sc gryffindor
Oops. Didn't notce you included /etc/hosts your first message. :)
Given the description of byname in the spec, it just calls gethostbyname()
unless an IP is listed. It sounds like your gethostbyname() is ignoring the
settings of /etc/nsswitch.conf. I'm not that familiar with Linux. Is there
anything else in Linux which has to be configured to use your nsswitch.conf
settings?
What does exim -d12 -bt user@??? return? It shouldn't request a DNS
lookup. I just setup a route_list which contains 'test.example.com
host.example.com byname' where test.example.com was defined in /etc/hosts
and nsswitch.conf was set to hosts: files dns and it did the right thing
(this is on Solaris):
routing user@???, domain test.example.com
localroute router called for user@???
route_domain = test.example.com
routelist_item = test.example.com host.example.com byname
after handling route_lists items, matched = 1
original hostlist=host.example.com options=byname
expanded hostlist="host.example.com" options=byname
Actual local interface address is 127.0.0.1
Actual local interface address is X.X.X.X
fully qualified name = host.example.com
host.example.com Y.Y.Y.Y mx=-1
routed by localroute router:
deliver to user@???
transport: remote_smtp
host host.example.com [Y.Y.Y.Y]
user@???
deliver to user@???
router = localroute, transport = remote_smtp
host host.example.com [Y.Y.Y.Y]
where Y.Y.Y.Y is the IP listed in /etc/hosts.
If exim was doing the DNS request, you'd see the dns lookup and results in
the -d12 output.
Tabor
--
--------------------------------------------------------------------
Tabor J. Wells twells@???
Fsck It! Just another victim of the ambient morality