I'm currently evaluating Mailman for managing some closed mailing
lists in our company, and while most of the installation and use works
pretty well, I've been banging my head against a problem with nested
multipart messages.

One of our fellows used to always write his messages as
multipart/signed, consisting of the message itself, plus a detached
GnuPG signature.  In case the message itself has more than a
text/plain part (like, an attached PDF file), it becomes a nested
multipart/mixed message part.

Mailman/pipermail has been trashing that, even though hypermail (that
has been used for the purpose until now) seemingly had no problems in
dissecting the various parts, and offering them as separately
downloadable URLs.  (For other reasons, we don't want to use hypermail
anymore if possible though, so I didn't consider stuffing it as an
external archiver into Mailman in the first place.)

So you won, and made me learn Python :-).  Now after some PDB
sessions, I'm almost convinced that

--- Mailman/Handlers/Scrubber.py~^IMon Mar 29 12:27:36 2004
+++ Mailman/Handlers/Scrubber.py^IMon Apr 19 21:22:16 2004
@@ -294,7 +294,7 @@
         # BAW: Martin's original patch suggested we might want to try
         # generalizing to utf-8, and that's probably a good idea (eventually).
         text = []
-        for part in msg.get_payload():
+        for part in msg.walk():
             # All parts should be scrubbed to text/plain by now.
             partctype = part.get_content_type()
             if partctype <> 'text/plain':

is the solution to the problem.  At least, this seems to perfectly
work so far -- but it's already quite late tonight, so I quite now,
will do some more testing by tomorrow.

Any comments on this?
-- 
J"org Wunsch                                           Unix support engineer
[EMAIL PROTECTED]        http://www.interface-systems.de/~j/

------------------------------------------------------
Mailman-Users mailing list
[EMAIL PROTECTED]
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/

Reply via email to