[Pkg-mailman-hackers] Bug#395493: Can't send messages to list
Lionel Elie Mamane
lionel at mamane.lu
Fri Nov 3 22:59:25 CET 2006
(I am not subscribed to mailman-users; please CC me on replies. Please
also keep the Debian bug entry in the CC list if appropriate.)
(I'm one of the maintainers of the Mailman package in Debian, the
OS - slash - "GNU/Linux distribution" that Lukasz is using.)
Mark Sapiro wrote:
>Lukasz Szybalski wrote:
>>On 10/24/06, Mark Sapiro <msapiro at value.net> 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
Not with the version of smtplib Lukasz has (python 2.3). It writes to
stdout. I sent to Lukasz a version of smtplib that writes debugging
info to stderr.
> which in a normal Mailman environment is logged to Mailman's error
> log.
In the version of Mailman that Lukasz uses, not exactly. It is logged
to a MultiLogger which tries to log to Mailman's error log _and_ to
the stderr of the process. Because the process is running as a daemon,
it does not have a stderr and thus writing to stderr fails, which
falls back (through _logexc_) to ... writing to stderr. Which fails,
but this time the exception (invalid file descriptor) is not caught
and Mailman barfs out with a traceback like (I manually patched the
smptlib on that machine to write to stderr instead of stdout):
Nov 02 15:21:51 2006 (18279) Uncaught runner exception: [Errno 9] Bad file descriptor
Nov 02 15:21:51 2006 (18279) Traceback (most recent call last):
File "/usr/lib/mailman/Mailman/Queue/Runner.py", line 111, in _oneloop
self._onefile(msg, msgdata)
File "/usr/lib/mailman/Mailman/Queue/Runner.py", line 167, in _onefile
keepqueued = self._dispose(mlist, msg, msgdata)
File "/usr/lib/mailman/Mailman/Queue/OutgoingRunner.py", line 73, in _dispose
self._func(mlist, msg, msgdata)
File "/var/lib/mailman/Mailman/Handlers/SMTPDirect.py", line 166, in process
conn.quit()
File "/var/lib/mailman/Mailman/Handlers/SMTPDirect.py", line 93, in quit
self.__conn.quit()
File "/usr/lib/python2.3/smtplib.py", line 709, in quit
self.docmd("quit")
File "/usr/lib/python2.3/smtplib.py", line 370, in docmd
self.putcmd(cmd,args)
File "/usr/lib/python2.3/smtplib.py", line 326, in putcmd
self.send(str)
File "/usr/lib/python2.3/smtplib.py", line 310, in send
if self.debuglevel > 0: print >> sys.stderr, 'send:', `str`
File "/usr/lib/mailman/Mailman/Logging/MultiLogger.py", line 45, in write
_logexc(logger, msg)
File "/usr/lib/mailman/Mailman/Logging/Utils.py", line 22, in _logexc
sys.__stderr__.write('Logging error: %s\n' % logger)
IOError: [Errno 9] Bad file descriptor
Looking at the code, this seems to be fixed in Mailman 2.1.9, and I
would assume probably in some earlier versions, too.
Best Regards,
--
Lionel
More information about the Pkg-mailman-hackers
mailing list