From 75dee062afed5d1432820d897de3bcf3dc2e8238 Mon Sep 17 00:00:00 2001 From: tkikuchi <> Date: Sat, 17 Dec 2005 05:11:44 +0000 Subject: Fixes for email.set_payload() not distinguish parsed or virgin payload. I've tested the example by Mark Sapiro: http://mail.python.org/pipermail/mailman-developers/2005-November/018395.html both with and without 'Content-Transfer-Encoding' but may need more test. --- Mailman/Handlers/ToArchive.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Mailman/Handlers/ToArchive.py') diff --git a/Mailman/Handlers/ToArchive.py b/Mailman/Handlers/ToArchive.py index cdee793f..59bf680f 100644 --- a/Mailman/Handlers/ToArchive.py +++ b/Mailman/Handlers/ToArchive.py @@ -19,7 +19,10 @@ import time from cStringIO import StringIO +from email import message_from_string + from Mailman import mm_cfg +from Mailman import Message from Mailman.Queue.sbcache import get_switchboard @@ -36,4 +39,10 @@ def process(mlist, msg, msgdata): # Send the message to the archiver queue archq = get_switchboard(mm_cfg.ARCHQUEUE_DIR) # Send the message to the queue - archq.enqueue(msg, msgdata) + if msg.get('x-mailman-scrubbed'): + # Clean Scrubber-munged message. + archmsg = message_from_string(msg.as_string(), Message.Message) + del archmsg['x-mailman-scrubbed'] + archq.enqueue(archmsg, msgdata) + else: + archq.enqueue(msg, msgdata) -- cgit v1.2.3