From dcbf47f5dad04b1b879dfe4fdc40d9aa633d403b Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Thu, 7 Apr 2011 19:12:56 -0700 Subject: Fix for bug #701558 went to far. Don't recast message/rfc822 parts. We want to keep the headers. --- Mailman/Handlers/MimeDel.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Mailman/Handlers') diff --git a/Mailman/Handlers/MimeDel.py b/Mailman/Handlers/MimeDel.py index b55bd5c4..13845e4f 100644 --- a/Mailman/Handlers/MimeDel.py +++ b/Mailman/Handlers/MimeDel.py @@ -201,9 +201,11 @@ def collapse_multipart_alternatives(msg): def recast_multipart(msg): # If we're left with a multipart message with only one sub-part, recast - # the message to just the sub-part. + # the message to just the sub-part, but not if the part is message/rfc822 + # because we don't want to lose the headers. if msg.is_multipart(): - if len(msg.get_payload()) == 1: + if (len(msg.get_payload()) == 1 and + msg.get_content_type() <> 'message/rfc822'): reset_payload(msg, msg.get_payload(0)) # now that we've recast this part, check the subordinate parts recast_multipart(msg) -- cgit v1.2.3