diff options
author | Mark Sapiro <msapiro@value.net> | 2007-11-11 21:40:15 -0800 |
---|---|---|
committer | Mark Sapiro <msapiro@value.net> | 2007-11-11 21:40:15 -0800 |
commit | f383c36db54e30c67f9bf22fc1498e9fed7b65d1 (patch) | |
tree | c85b738d79c54f4660db2d90ceb4bdbc1ebfe74d /Mailman/Bouncers/DSN.py | |
parent | 70689d7eb61f8c852a6a02be1d65c86cde06bde2 (diff) | |
download | mailman2-f383c36db54e30c67f9bf22fc1498e9fed7b65d1.tar.gz mailman2-f383c36db54e30c67f9bf22fc1498e9fed7b65d1.tar.xz mailman2-f383c36db54e30c67f9bf22fc1498e9fed7b65d1.zip |
Backported Bounce recognizer changes and tests from the 3.0 branch
Diffstat (limited to '')
-rw-r--r-- | Mailman/Bouncers/DSN.py | 7 |
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. |