-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mark Sapiro wrote: | | I think the best solution is to turn off the preservation of | unparseable messages, and add an mm_cfg.py setting to turn it on. I | can work up a patch. |
A patch is attached. It doesn't turn off preservation by default because it piggybacks on an existing Defaults.py/mm_cfg.py setting which was lately used only by bin/update. The Defaults.py setting is QRUNNER_SAVE_BAD_MESSAGES = Yes Setting QRUNNER_SAVE_BAD_MESSAGES = No in mm_cfg.py will stop preserving the unparseable messages, but certain other problem qfiles will still be preserved. Additionally, preserved files will be stored in qfiles/bad and not qfiles/shunt. Finally, if QRUNNER_SAVE_BAD_MESSAGES = No, the log message will revert to the old "Ignoring unparseable message:". Brad, If you could apply this patch (you can apply it directly to the installation directory, by e.g. cd /usr/local/mailman patch -p0 < path/to/2.1.10.patch.txt and set QRUNNER_SAVE_BAD_MESSAGES = No in mm_cfg.py and restart Mailman, things should be back more or less the way they were in 2.1.9. I have applied the patch to my installation and I'm sure it's good, but I haven't seen any unparseable messages. - -- Mark Sapiro <[EMAIL PROTECTED]> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) iD8DBQFIDVAhVVuXXpU7hpMRAqHBAKCFODqF84UhBYnRvblS00eX4roxdQCeNOXl amZX+XRwrdd9RpIE80eOFKM= =vi+P -----END PGP SIGNATURE-----
=== modified file 'Mailman/Queue/Runner.py' --- Mailman/Queue/Runner.py 2007-05-08 03:16:04 +0000 +++ Mailman/Queue/Runner.py 2008-04-22 02:02:38 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2007 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2008 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -103,12 +103,18 @@ # but other problems can occur in message parsing, e.g. # ValueError, and exceptions can occur in unpickling too. # We don't want the runner to die, so we just log and skip - # this entry, but preserve it for analysis. + # this entry, but maybe preserve it for analysis. self._log(e) - syslog('error', - 'Skipping and preserving unparseable message: %s', - filebase) - self._switchboard.finish(filebase, preserve=True) + if mm_cfg.QRUNNER_SAVE_BAD_MESSAGES: + syslog('error', + 'Skipping and preserving unparseable message: %s', + filebase) + preserve=True + else: + syslog('error', + 'Ignoring unparseable message: %s', filebase) + preserve=False + self._switchboard.finish(filebase, preserve=preserve) continue try: self._onefile(msg, msgdata) === modified file 'Mailman/Queue/Switchboard.py' --- Mailman/Queue/Switchboard.py 2008-02-14 16:53:52 +0000 +++ Mailman/Queue/Switchboard.py 2008-04-22 02:11:19 +0000 @@ -169,13 +169,13 @@ bakfile = os.path.join(self.__whichq, filebase + '.bak') try: if preserve: - psvfile = os.path.join(mm_cfg.SHUNTQUEUE_DIR, filebase + '.psv') + psvfile = os.path.join(mm_cfg.BADQUEUE_DIR, filebase + '.psv') # Create the directory if it doesn't yet exist. # Copied from __init__. omask = os.umask(0) # rwxrws--- try: try: - os.mkdir(mm_cfg.SHUNTQUEUE_DIR, 0770) + os.mkdir(mm_cfg.BADQUEUE_DIR, 0770) except OSError, e: if e.errno <> errno.EEXIST: raise finally:
------------------------------------------------------ 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&file=faq01.027.htp