Fwd: [Mailman-Users] shunt messages

Nicolas Bertrand nsb at ceh.ac.uk
Thu Sep 18 11:47:42 CEST 2003

OK... Just found that post in the mailman-developers list that did the


"Barry, as was noted in a private email to ya - the problem was solved
the following patch (courtesy of Mohammed Elzubeir),

--- Scrubber.py.orig 2003-08-13 23:19:19.000000000 -0700
+++ Scrubber.py 2003-08-14 00:23:47.000000000 -0700
@@ -305,6 +305,8 @@
                     t = unicode(t, 'ascii',
                     # Should use HTML-Escape, or try generalizing to
+                   if len(charset) == 0:
+                       charset = 'us-ascii'
                     t = t.encode(charset, 'replace')
                 except (UnicodeError, LookupError):
                     t = t.encode(lcset, 'replace')

once we applied the patch and 'unshunt'ed everything went through.  We
did have a couple of messages with no Mime and Content-Type headers
(which are legal to have) and those seemed to have caused the problem.
A null charset within mailman caused our problems it seems and that
potential corner-case needs to be designed for.  As for a sample - I
tried mailing the affected list a simple "test" from this yahoo
account and it got shunted (as noted there is nothing peculiar about
the messages - mailman simply got into a state/setting where it
shunting everything -- Larry Price notes a possible means to get into
the 'state' above).  And again, I really don't think it was/is a
configuration/installation issue since the other 12 lists work without
any complaints and/or problems."



>>> Nicolas Bertrand 09/18/03 09:14am >>>

>>> "Nicolas Bertrand" <nsb at ceh.ac.uk> 09/18/03 08:57am >>>

We are having some serious problem with a 2.1.2 mailman install. Some
messages get transferred to qfiles/shunt and stay there forever. I am
calling on your help on this one. 

I understand from previous mailing list posts that the shunt directory
is used by mailman if:
   o messages are too large to get delivered
   o bug in mailman
   o problem with python installation
The original error message (in logs/error) was indicating some problem
with the 'strptime' module:
This was confirmed:
Python 2.2 (#1, Aug  4 2003, 14:00:57) 
[GCC 2.95.2 19991024 (release)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.strptime
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
AttributeError: 'module' object has no attribute 'strptime'

In the hope of remedying this, I have installed python 2.3
Python 2.3 (#1, Sep 17 2003, 21:23:32)
[GCC 2.95.2 19991024 (release)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.strptime
<built-in function strptime>

As you can see python is now happy with the time.strptime module.

I then proceeded to reinstall mailman. All seemed fine. I then
proceeded to unshunt the messages... In vain. They come back to the
shunt directory.

However, the error is  different:
Sep 18 08:42:40 2003 (15588) Uncaught runner exception: Empty module
Sep 18 08:42:40 2003 (15588) Traceback (most recent call last):
  File "/Users/mailman/Mailman/Queue/Runner.py", line 105, in _oneloop
    self._onefile(msg, msgdata)
  File "/Users/mailman/Mailman/Queue/Runner.py", line 155, in _onefile
    keepqueued = self._dispose(mlist, msg, msgdata)
  File "/Users/mailman/Mailman/Queue/IncomingRunner.py", line 130, in
    more = self._dopipeline(mlist, msg, msgdata, pipeline)
  File "/Users/mailman/Mailman/Queue/IncomingRunner.py", line 153, in
    sys.modules[modname].process(mlist, msg, msgdata)
  File "/Users/mailman/Mailman/Handlers/ToDigest.py", line 89, in
    send_digests(mlist, mboxfp)
  File "/Users/mailman/Mailman/Handlers/ToDigest.py", line 130, in
    send_i18n_digests(mlist, mboxfp)
  File "/Users/mailman/Mailman/Handlers/ToDigest.py", line 303, in
    msg = scrubber(mlist, msg)
  File "/Users/mailman/Mailman/Handlers/Scrubber.py", line 308, in
    t = t.encode(charset, 'replace')
  File "/usr/local/lib/python2.3/encodings/__init__.py", line 84, in
    globals(), locals(), _import_tail)
ValueError: Empty module name

Sep 18 08:42:40 2003 (15588) SHUNTING:

Any ideas?

CEH Oxford

Mailman-Users mailing list
Mailman-Users at python.org 
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py 
Searchable Archives:

This message was sent to: nsb at ceh.ac.uk 
Unsubscribe or change your options at

More information about the Mailman-Users mailing list