Header.py, UnicodeDecodeError, and shunting
Software versions: Python 2.3.3 Mailman 2.1.4
After reading through the archives and applying the Scrubber.py patch from:
http://sourceforge.net/tracker/index.php?func=detail&aid=891491&group_id=103&atid=300103
I still have UnicodeDecodeErrors within Header.py:
May 04 14:49:11 2004 (6090) Uncaught runner exception: 'ascii' codec can't decode byte 0xb0 in position 13: ordinal not in range(128) May 04 14:49:11 2004 (6090) Traceback (most recent call last): File "/usr/local/mail/mailman/Mailman/Queue/Runner.py", line 110, in _oneloop self._onefile(msg, msgdata) File "/usr/local/mail/mailman/Mailman/Queue/Runner.py", line 160, in _onefile keepqueued = self._dispose(mlist, msg, msgdata) File "/usr/local/mail/mailman/Mailman/Queue/CommandRunner.py", line 223, in _dispose res = Results(mlist, msg, msgdata) File "/usr/local/mail/mailman/Mailman/Queue/CommandRunner.py", line 77, in __init__ subj = make_header(decode_header(subj)).__unicode__() File "/usr/local/mail/mailman/pythonlib/email/Header.py", line 144, in make_header h.append(s, charset) File "/usr/local/mail/mailman/pythonlib/email/Header.py", line 272, in append ustr = unicode(s, incodec, errors) UnicodeDecodeError: 'ascii' codec can't decode byte 0xb0 in position 13: ordinal not in range(128)
May 04 14:49:11 2004 (6090) SHUNTING: 1083696551.06902+686403e653920540ba0135ba554ffa089554d286 May 04 14:59:10 2004 (6090) Uncaught runner exception: 'ascii' codec can't decode byte 0xb9 in position 26: ordinal not in range(128) May 04 14:59:10 2004 (6090) Traceback (most recent call last): File "/usr/local/mail/mailman/Mailman/Queue/Runner.py", line 110, in _oneloop self._onefile(msg, msgdata) File "/usr/local/mail/mailman/Mailman/Queue/Runner.py", line 160, in _onefile keepqueued = self._dispose(mlist, msg, msgdata) File "/usr/local/mail/mailman/Mailman/Queue/CommandRunner.py", line 223, in _dispose res = Results(mlist, msg, msgdata) File "/usr/local/mail/mailman/Mailman/Queue/CommandRunner.py", line 77, in __init__ subj = make_header(decode_header(subj)).__unicode__() File "/usr/local/mail/mailman/pythonlib/email/Header.py", line 144, in make_header h.append(s, charset) File "/usr/local/mail/mailman/pythonlib/email/Header.py", line 272, in append ustr = unicode(s, incodec, errors) UnicodeDecodeError: 'ascii' codec can't decode byte 0xb9 in position 26: ordinal not in range(128)
May 04 14:59:10 2004 (6090) SHUNTING: 1083697150.3277359+511cb73c182e4a71854cf110a1ae50187c4c9b7a
According to the python traceback in mailman/logs/error it looks as though it is failing while trying to decode the subject line of the message. Upon further inspection of the guilty messages the subject lines do indeed appear to contain characters that could not be decoded (SpamAssassin gave the messages high spam-levels as well as failing with test SUBJ_ILLEGAL_CHARS among others).
Is there a patch which handles this problem in Header.py? I do not wish to have legitimate email shunted if I can avoid it.
-- +------------------------------------------------------------+ | Dave Vasil vasil@cs.utk.edu | | University of Tennessee Computer Science Dept. | | UTKCS Systems Administrator 865-974-8364 | +------------------------------------------------------------+
participants (1)
-
David Vasil