diff options
author | tkikuchi <> | 2005-12-17 05:11:44 +0000 |
---|---|---|
committer | tkikuchi <> | 2005-12-17 05:11:44 +0000 |
commit | 75dee062afed5d1432820d897de3bcf3dc2e8238 (patch) | |
tree | c0cb18cab8ab2e89526fbefc04a5737d94a4bcf4 /Mailman/Handlers/ToArchive.py | |
parent | 4fc195111db5d68eb97d259ed8bc67beae95302d (diff) | |
download | mailman2-75dee062afed5d1432820d897de3bcf3dc2e8238.tar.gz mailman2-75dee062afed5d1432820d897de3bcf3dc2e8238.tar.xz mailman2-75dee062afed5d1432820d897de3bcf3dc2e8238.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | Mailman/Handlers/ToArchive.py | 11 |
1 files changed, 10 insertions, 1 deletions
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) |