On 10/24/06, Mark Sapiro <[EMAIL PROTECTED]> wrote:
> Lukasz Szybalski wrote:
>
> >On 10/24/06, Mark Sapiro <[EMAIL PROTECTED]> wrote:
> >>
> >> We still don't know what causes the timeout. The smtplib debugging info
> >> would help.
> >Where would i find it or how would i get it. Error, smtp,
> >smtp-failure, syslog has only what i have pasted in.
>
> The patch to SMTPDirect.py which you say you installed causes Pythons
> smtplib to write debugging info to stderr which in a normal Mailman
> environment is logged to Mailman's error log. Since you are not
> getting the debugging information in Mailman's error log, either you
> haven't applied the patch correctly or you haven't patched the correct
> file (see the last paragraph of
> <http://mail.python.org/pipermail/mailman-users/2006-October/054017.html>)
> or something is going wrong with logging of stderr writes to the error
> log.
That is the file i patched SMTPDirect.py

 57 class Connection:
     58     def __init__(self):
     59         self.__conn = None
     60
     61     def __connect(self):
     62         self.__conn = smtplib.SMTP()
     63         self.__conn.set_debuglevel(1)
     64         self.__conn.connect(mm_cfg.SMTPHOST, mm_cfg.SMTPPORT)
     65         self.__numsessions=mm_cfg.SMTP_MAX_SESSIONS_PER_CONNECTION

So after playing with it for a while...I figured the exception is here...

  381     except (socket.error, IOError, smtplib.SMTPException), e:
    382         # MTA not responding, or other socket problems, or any
other kind of
    383         # SMTPException.  In that case, nothing got delivered,
so treat this
    384         # as a temporary failure.
    385         syslog('smtp-failure', 'Low level smtp error: %s,
msgid: %s', e, msgid)
    386         error = str(e)
    387         for r in recips:
    388             refused[r] = (-1, error)

Is there a way to manually get the debug info from smtplib
(conversation with postfix) within this file? debuglevel works if i do
it by hand...

I could add something like this, its just where?
syslog('smtp-failure', 'conversation with smtplib: %s', e)

Also,
the emails seem to go through. Then they stop and then go after i do reopen.

Oct 25 12:51:39 localhost postfix/qmgr[1956]: 3B83225C0C9:
from=<[EMAIL PROTECTED]>, size=1070, nrcpt=1 (queue active)
Oct 25 12:51:39 localhost postfix/smtpd[2479]: disconnect from
xxx.net[207.115.57.84]
Oct 25 12:51:39 localhost postfix/local[2483]: 3B83225C0C9:
to=<[EMAIL PROTECTED]>, relay=local, delay=0, status=sent (delivered to
command: /var/lib/mailman/mail/mailman post test)
Oct 25 12:51:39 localhost postfix/qmgr[1956]: 3B83225C0C9: removed
Oct 25 12:51:40 localhost postfix/smtpd[2479]: connect from
localhost[127.0.0.1]Oct 25 12:51:40 localhost postfix/smtpd[2479]:
EE11A25C0C9: client=localhost[127.0.0.1]
Oct 25 12:51:40 localhost postfix/cleanup[2482]: EE11A25C0C9:
message-id=<[EMAIL PROTECTED]>
Oct 25 12:51:41 localhost postfix/qmgr[1956]: EE11A25C0C9:
from=<[EMAIL PROTECTED]>, size=2078, nrcpt=4 (queue active)
Oct 25 12:51:41 localhost postfix/smtpd[2479]: disconnect from
localhost[127.0.0.1]
Oct 25 12:51:41 localhost postfix/local[2483]: EE11A25C0C9:
to=<[EMAIL PROTECTED]>, relay=local, delay=1, status=sent (delivered
to command: procmail -a "$EXTENSION")
Oct 25 12:51:41 localhost postfix/local[2483]: EE11A25C0C9:
to=<[EMAIL PROTECTED]>, orig_to=<[EMAIL PROTECTED]>, relay=local,
delay=1, status=sent (delivered to command: procmail -a "$EXTENSION")
Oct 25 12:51:41 localhost postfix/smtp[2486]: EE11A25C0C9:
to=<[EMAIL PROTECTED]>, relay=smtp.sbcglobal.yahoo.com[68.142.229.41],
delay=1, status=sent (250 ok 1161802397 qp 24637)
Oct 25 12:51:41 localhost postfix/smtp[2486]: EE11A25C0C9:
to=<[EMAIL PROTECTED]>,
relay=smtp.sbcglobal.yahoo.com[68.142.229.41], delay=1, status=sent
(250 ok 1161802397 qp 24637)
Oct 25 12:51:41 localhost postfix/qmgr[1956]: EE11A25C0C9: removed

Oct 25 12:55:20 localhost postfix/smtpd[2501]: connect from
localhost[127.0.0.1]Oct 25 12:55:20 localhost postfix/smtpd[2501]:
525DB25C0C9: client=localhost[127.0.0.1]

Doing : mailmanctrl reopen after 20 sec.

Oct 25 12:55:46 localhost postfix/smtpd[2501]: lost connection after
DATA from localhost[127.0.0.1]
Oct 25 12:55:46 localhost postfix/smtpd[2501]: disconnect from
localhost[127.0.0.1]
Oct 25 12:55:46 localhost postfix/cleanup[2504]: 525DB25C0C9:
message-id=<[EMAIL PROTECTED]>
Oct 25 12:55:46 localhost postfix/smtpd[2501]: connect from
localhost[127.0.0.1]Oct 25 12:55:46 localhost postfix/smtpd[2501]:
45FD325C0C9: client=localhost[127.0.0.1]
Oct 25 12:55:46 localhost postfix/cleanup[2504]: 45FD325C0C9:
message-id=<[EMAIL PROTECTED]>
Oct 25 12:55:46 localhost postfix/qmgr[1956]: 45FD325C0C9:
from=<[EMAIL PROTECTED]>, size=2106, nrcpt=1 (queue active)
Oct 25 12:55:46 localhost postfix/smtpd[2501]: disconnect from
localhost[127.0.0.1]
Oct 25 12:55:46 localhost postfix/smtp[2508]: 45FD325C0C9:
to=<[EMAIL PROTECTED]>, relay=smtp.sbcglobal.yahoo.com[68.142.229.41],
delay=0, status=sent (250 ok 1161802643 qp 89987)
Oct 25 12:55:46 localhost postfix/qmgr[1956]: 45FD325C0C9: removed

Thanks,
Lucas

>
> I don't think it's likely that the problem is in the logging of stderr
> unless this is a Debian issue that I don't know about.
------------------------------------------------------
Mailman-Users mailing list
Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Security Policy: 
http://www.python.org/cgi-bin/faqw-mm.py?req=show&amp;file=faq01.027.htp

Reply via email to