Problem w/ smtplib

Victor Subervi victorsubervi at gmail.com
Sat Nov 21 13:59:13 EST 2009


On Sat, Nov 21, 2009 at 1:16 PM, Kev Dwyer <kevin.p.dwyer at gmail.com> wrote:

>
> 2009/11/21 Victor Subervi <victorsubervi at gmail.com>
>
> On Sat, Nov 21, 2009 at 12:04 PM, Kev Dwyer <kevin.p.dwyer at gmail.com>wrote:
>>
>>> On Sat, 21 Nov 2009 08:19:52 -0500, Victor Subervi wrote:
>>>
>>> Hello Victor,
>>>
>>> The information that you have sent comes from the client side of the
>>> transaction, so it isn't possible to tell why the server disconnected.
>>> Assuming that there is an SMTP server listening on port 25, you need to
>>> check the SMTP server logs.
>>
>>
>> There wasn't anything in /var/log/maillog. Is that where I should have
>> checked?
>>
>>
>>> You might need to crank up the logging to
>>> get useful output.
>>>
>>
>> How?
>> Look at the output below:
>>
>> [root at 13gems stcroixresort]# netstat -tulp
>> Active Internet connections (only servers)
>> Proto Recv-Q Send-Q Local Address               Foreign
>> Address             State       PID/Program name
>> tcp        0      0 *:mysql
>> *:*                         LISTEN      24488/mysqld
>> tcp        0      0 *:pop3
>> *:*                         LISTEN      5278/tcpserver
>> tcp        0      0 *:ftp
>> *:*                         LISTEN      26564/vsftpd
>> tcp        0      0 localhost.localdomai:domain
>> *:*                         LISTEN      11845/named
>> tcp        0      0 *:smtp
>> *:*                         LISTEN      5274/tcpserver
>> tcp        0      0 localhost.localdomain:rndc
>> *:*                         LISTEN      11845/named
>> tcp        0      0 *:http
>> *:*                         LISTEN      5201/httpd
>> tcp        0      0 localhost:domain
>> *:*                         LISTEN      11845/named
>> tcp        0      0 *:ssh
>> *:*                         LISTEN      15509/sshd
>> tcp        0      0 localhost:rndc
>> *:*                         LISTEN      11845/named
>> udp        0      0 localhost.locald:domain
>> *:*                                     11845/named
>> udp        0      0 localhost:domain
>> *:*                                     11845/named
>> [root at 13gems stcroixresort]# qmailctl stat
>> /service/qmail-send: up (pid 5266) 594565 seconds
>> /service/qmail-send/log: up (pid 5271) 594565 seconds
>> /service/qmail-smtpd: up (pid 5274) 594565 seconds
>> /service/qmail-smtpd/log: up (pid 5276) 594565 seconds
>> /service/qmail-pop3d: up (pid 5278) 594565 seconds
>> /service/qmail-pop3d/log: up (pid 5279) 594565 seconds
>> messages in queue: 0
>> messages in queue but not yet preprocessed: 0
>>
>> Please advise.
>> TIA,
>> V
>>
>
> Hello Victor,
>
>  I'm afraid I don't know much about mail servers, you need to check the
> server docs or ask on a qmail mailing list.
>
> If you really think this is a python issue, then you could try:
> >>> import smtplib
> >>> server = smtplib.SMTP()
> >>> server.set_debuglevel(1)
> >>> server.connect()
> connect: ('localhost', 25)
> connect: (25, 'localhost')
> reply: '220 pluto.site ESMTP Postfix\r\n'
> reply: retcode (220); Msg: pluto.site ESMTP Postfix
> connect: pluto.site ESMTP Postfix
> (220, 'pluto.site ESMTP Postfix')
> >>> server.quit()
> send: 'quit\r\n'
> reply: '221 2.0.0 Bye\r\n'
> reply: retcode (221); Msg: 2.0.0 Bye
> (221, '2.0.0 Bye')
>
>
> and see if there are any error messages/tracebacks in the output; but if
> you still get a disconnect exception then it's unlikely that this is a
> python issue.
>

Thank you. Yes, there was an error.
V
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20091121/2eaa02bd/attachment-0001.html>


More information about the Python-list mailing list