aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers/MimeDel.py
diff options
context:
space:
mode:
authorMark Sapiro <msapiro@value.net>2011-04-07 19:12:56 -0700
committerMark Sapiro <msapiro@value.net>2011-04-07 19:12:56 -0700
commitdcbf47f5dad04b1b879dfe4fdc40d9aa633d403b (patch)
treeaa614ebbc3c11e59bc22b4e65c104bdb88596691 /Mailman/Handlers/MimeDel.py
parent5e2f50ff61060fd11ae19ea43808f4a6b07d5b0a (diff)
downloadmailman2-dcbf47f5dad04b1b879dfe4fdc40d9aa633d403b.tar.gz
mailman2-dcbf47f5dad04b1b879dfe4fdc40d9aa633d403b.tar.xz
mailman2-dcbf47f5dad04b1b879dfe4fdc40d9aa633d403b.zip
Fix for bug #701558 went to far. Don't recast message/rfc822 parts.
We want to keep the headers.
Diffstat (limited to 'Mailman/Handlers/MimeDel.py')
-rw-r--r--Mailman/Handlers/MimeDel.py6
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)