Re: Nameserver calls - libesmtp problem?



On Thu, 21 June 14:58 Carlos Morgado wrote:

| backtrack ... libESMTP is doing ns lookups for 'localhost' ?

That depends on your gethostbyname_r.  Normally the Un*x versions
will interpret dotted IPv4 addresses, maybe IPv6 ones and use DNS or
/etc/hosts to map names to addresses.  Some Unices, e.g. Solaris
will also resolve names using yellow pages. Exact behaviour is usually
determined by settings in /etc/resolv.conf but check your local
man pages for exact behaviour - it varies a bit.

I would expect a typical Linux distro at least to use /etc/hosts
to resolve "localhost" and the domain name of the localhost and
DNS for pretty much everything else.  I might be wrong here though.

Of course, if you use DHCP things are under control of your sysadmin!

| unless albrecht's system is messed up that is soo wrong.

I would have thought that a hardcoded "localhost" -> 127.0.0.1
in the resolver libraries would be safe enough and would avoid
users configuring themselves into trouble.  However, I'm sure that
there are subtle reasons for not doing this.

I'd be reluctant to hardcode the mapping into *any* program since
this would lead to inconsistent behaviour between different
applications.  Some might work as expected, others might not.
Best thing is to make sure /etc/resolv.conf and /etc/hosts are
correct.  This would affect other host name lookups done by balsa, 
e.g. for IMAP and POP-3.

Brian




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]