aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Bouncers/DSN.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/Bouncers/DSN.py')
-rw-r--r--Mailman/Bouncers/DSN.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Mailman/Bouncers/DSN.py b/Mailman/Bouncers/DSN.py
index 869e0461..e4d2f486 100644
--- a/Mailman/Bouncers/DSN.py
+++ b/Mailman/Bouncers/DSN.py
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2006 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2007 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -93,6 +93,11 @@ def process(msg):
# in a multipart/mixed outer part.
if msg.is_multipart() and msg.get_content_subtype() == 'mixed':
msg = msg.get_payload()[0]
+ # The above will suffice if the original message 'parts' were wrapped with
+ # the disclaimer added, but the original DSN can be wrapped as a
+ # message/rfc822 part. We need to test that too.
+ if msg.is_multipart() and msg.get_content_type() == 'message/rfc822':
+ msg = msg.get_payload()[0]
# The report-type parameter should be "delivery-status", but it seems that
# some DSN generating MTAs don't include this on the Content-Type: header,
# so let's relax the test a bit.