aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/Handlers')
-rw-r--r--Mailman/Handlers/MimeDel.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/Mailman/Handlers/MimeDel.py b/Mailman/Handlers/MimeDel.py
index 13845e4f..ab7483ba 100644
--- a/Mailman/Handlers/MimeDel.py
+++ b/Mailman/Handlers/MimeDel.py
@@ -187,7 +187,14 @@ def collapse_multipart_alternatives(msg):
if subpart.get_content_type() == 'multipart/alternative':
try:
firstalt = subpart.get_payload(0)
- newpayload.append(firstalt)
+ if msg.get_content_type() == 'message/rfc822':
+ # This is a multipart/alternative message in a
+ # message/rfc822 part. We treat it specially so as not to
+ # lose the headers.
+ reset_payload(subpart, firstalt)
+ newpayload.append(subpart)
+ else:
+ newpayload.append(firstalt)
except (IndexError, TypeError):
pass
elif subpart.is_multipart():