Re: Nameserver calls - libesmtp problem?



Am 28.06.2001 10:23:21 schrieb(en) Brian Stafford:
[snip]
> | So in the end I am afraid that there is a problem with your lib? What
> | do you think about all that?
> 
> Sadly, there is a problem yes.  However it isn't libESMTP's code that
> is making the DNS query.  Here is what I think is happening.
> The problem arises inside the connect() system call.  On my system
> when I step over connect() I get a DNS query for the A record of the
> localhost's domain name, i.e. the one returned by gethostname().
> 
> Obviously connect() does not query a name server, so the only other
> place such a query might happen is on the service at the other end
> of the socket.
> 
> On my system, I have set up inetd to run "sendmail -U -bs" when I
> connect to port 587.  If I "telnet 127.0.0.1 587" I see a single DNS
> lookup for the hostname of my system (if I telnet localhost 587, I
> see loads of DNS as telnet tries to resolve localhost).
> 
> For some reason sendmail looks up the hostname it prints in its
> greeting line, which in my case is :-
> 
> 220 helicon.office-logic.com ESMTP Sendmail ... blah blah blah
> 
> I figure it is this which causes your system to dial up.

No, for sure this is *not* the problem here. I run sendmail at port 25, and it
does never dial in. I sent you a log from a session with `telnet localhost 25'
yesterday. You can see that I submitted exactly the same commands as your test
app does, but I did not get the dns call. Furthermore (and I think this
supports your connect thesis?) I see the dail happening *before* your test
program prints anything out. On the other hand, telnet should not do anything
else than doing a connect. I must admit that this goes beyond my knowledge of
the socket implementation, but I really can't the the big difference which
makes one app behave correctly and the other one not (Regarding the sendmail
setup, I actually took turns to prevent it from dialling in, which took me
some weeks before I had all settings in the cf file straight.)

> Right now I'm not sure what to do about this.  I suppose if you have
> a copy of the bat book there might be some information in there on
> how to make sendmail avoid doing this.  (My advice is use something
> better than sendmail, i.e almost any other MTA.)

Hmmm, in principle I am quite happy with sendmail (after this long and
difficult time of setup; if you had asked me during that period, I guess my
answer had been a really different one ;-)), so I guess I rather try to
configure balsa without-esmtp...

> The real solution, I think, is that you really need to be running
> a name server on your localhost (or network if you have one) and
> ensure that server is used to resolve hostnames.  At least then
> it is possible to resolve names for the local machines without
> dialling.

Well that's right... Again, up to now I never missed that, and libesmtp was
*really* the first thing to cause any trouble (forget about Netscape, it's
crap in my view...)

Thanks, Albrecht.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Albrecht Dreß  -  Monschauer Straße 22  -  D-53121 Bonn (Germany)
      Phone (+49) 228 6199571  -  E-Mail albrecht.dress@arcormail.de
_________________________________________________________________________




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