[Mailman-Developers] Problem archiving mail sent from pine (and other MUAs)

Tanner Lovelace lovelace@wayfarer.org
Wed, 15 Nov 2000 00:30:11 -0500

I seem to have found an error where pipermail fails to
process mail sent from pine (and possibly other mailers).
The message gets added to the <listname>.mbox file but
nothing else.  In the logs/error file I get the following

Nov 15 00:15:01 2000 qrunner(32366): Traceback (innermost last):
Nov 15 00:15:01 2000 qrunner(32366):   File
"/usr/lib/mailman/Mailman/Archiver/Archiver.py", line 221, in
Nov 15 00:15:01 2000 qrunner(32366):   File
"/usr/lib/mailman/Mailman/Archiver/pipermail.py", line 521, in
Nov 15 00:15:01 2000 qrunner(32366):   File
"/usr/lib/mailman/Mailman/Archiver/HyperArch.py", line 224, in __init__
Nov 15 00:15:01 2000 qrunner(32366): TypeError: read-only character
buffer, None
Nov 15 00:15:01 2000 (32366) CORRUPT ARCHIVE FOR LIST: test

Looking at the file HyperArch.py at line 224 I find the following:

        # Snag the content-* headers.  RFC 1521 states that their values
        # case insensitive.
        ctype = message.getheader('Content-Type') or "text/plain"
        cenc = message.getheader('Content-Transfer-Encoding')
        self.ctype = string.lower(ctype)
        self.cenc = string.lower(cenc)

(line 224 is the last one.)  So, apparently it is failing when it
tries to lowercase the "Content-Transfer-Encoding" header string.

So, I checked, and sure enough, pine (at least on the two systems
I had access to) does not set this header.  I then looked at 
RFC 1521 to see if this header is required.  From the RFC (p.14) I

   These values are not case sensitive.  That is, Base64 and BASE64 and
   bAsE64 are all equivalent.  An encoding type of 7BIT requires that
   the body is already in a seven-bit mail-ready representation.  This
   is the default value -- that is, "Content-Transfer-Encoding: 7BIT" is
   assumed if the Content-Transfer-Encoding header field is not present.

So, the "Contenet-Transfer-Encoding" header is not mandatory and
should not crash when it isn't there.  Since I don't actually know
python, :-)
can anyone suggest an easy fix?  It doesn't seem like it would be that
hard to fix.

I believe this is the same problem that Joshua Burley <jburley@kuci.org>
first reported.

Tanner Lovelace
P.S. Should I submit this as a bug to sourceforge?      
Tanner Lovelace
Cthulu for President.  Why settle for the lesser evil?