Re: [Exim] Configuration question

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Phil Pennock
Datum:  
To: Norman Walsh
CC: Exim Users
Betreff: Re: [Exim] Configuration question
On 2001-11-15 at 20:57 -0500, Norman Walsh wrote:
> / Phil Pennock <Phil.Pennock@???> was heard to say:
> | > Changing hosts=localhost to hosts=127.0.0.1 fixed that problem and now
> | > deliver works as expected.
> |
> | You'll have problems elsewhere, in other applications.
>
> I'm a little confused. I made the change in exim.conf, how is that
> going to have an effect on other applications?


A lack of clarity on my part, for which I apologise.

The fact that this was necessary, means that any application on the
system which does gethostbyname("localhost") is going to get the same
results as you originally saw. You've worked around the problem in
Exim, but the issue is still there.

> | As an administrative matter, it's generally wise to have /etc/hosts
> | contain a few essential items, eg:
> | 127.0.0.1 localhost localhost.MYEMPLOYER.com
>
> I already have:
>
> 127.0.0.1    mercury    localhost


But because your "/etc/resolv.conf" specifies domains to search, it's
looking up localhost.MYEMPLOYER.com, which is returning some dubious
results. You might wish to ask your DNS admin why
localhost.MYEMPLOYER.com is returning real addresses. Ideally, it
should return 127.0.0.1 -- that would work around the problem.

Another fix would be to simply expand your current /etc/hosts slightly:
127.0.0.1    mercury localhost localhost.MYEMPLOYER.com


That way, if /etc/hosts is looked at first, then you'll get 127.0.0.1 as
the IP address.

> Yep, I've got that too. The odd wrinkle seems to be my /etc/resolv.conf
> which had some leftover things from the last time I was behind the firewall.
>
> search east.MYEMPLOYER.com MYEMPLOYER.com
> nameserver 24.216.219.12


If you lookup resolv.conf(5) or whatever it is on your system, there
might be a "lookup" directive. "lookup file bind" with only the
essentials in /etc/hosts is very frequently a good thing.

Basically, if your OS is asked "what's the IP address of localhost" and
it replies with anything other than "127.0.0.1", then you'll experience
problems.
--
Frequency Hopping (v.i.):
Avoiding creditors by never staying long at the same address.