"Jason R. Mastaler" <[EMAIL PROTECTED]> writes:

> Dave Sill <[EMAIL PROTECTED]> writes:
>
>> Connecting directly to port 25 via:
>>
>>   telnet localhost 25
>>
>> is nearly instantaneous.
>
> Yes, but did you go through a full SMTP conversation?

Yes--no delays.

> Some suggestions: Try going through a full SMTP conversation from
> telnet.  Try using an SMTP client such as Mozilla mail on localhost
> and see if you see the same delays.

I'll try that when I get home.

> Also try the following simple Python script to see if you can isolate
> the delay.

It sits there for 20 seconds then squirts out the SMTP
dialogue. strace shows four 5-second delays for DNS lookups,
apparently two for sparge.sill and two for sparge. The script doesn't
contain any reference to sparge:

----
#!/usr/bin/env python2
#
import smtplib

mail_from = '[EMAIL PROTECTED]'
data = 'this is a test'
# change these variables
mail_to = 'dave'
smtphost = 'localhost'

server = smtplib.SMTP(smtphost)
server.set_debuglevel(1)
server.sendmail(mail_from, mail_to, data)
server.quit()
----

/etc/hosts is:

----
127.0.0.1       localhost.localdomain   localhost
192.168.1.1     lanmodem
192.168.1.4     sparge.sill     sparge
----

Thanks for your help. Looks like a python<->DNS issue. Where should I
go next?

-Dave
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users

Reply via email to