diff options
-rw-r--r-- | Mailman/Handlers/MimeDel.py | 6 |
1 files changed, 4 insertions, 2 deletions
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) |