aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2014-05-06 09:35:47 -0700
committerMark Sapiro <mark@msapiro.net>2014-05-06 09:35:47 -0700
commitf3b2c2c7523b5962164672b5b5889c2eb85aca0a (patch)
treed97759d48a6b83b30a6c9b22e08dc7feb271ec38
parentd3ffb15770a927597b16bebc3719b5e690f7395b (diff)
downloadmailman2-f3b2c2c7523b5962164672b5b5889c2eb85aca0a.tar.gz
mailman2-f3b2c2c7523b5962164672b5b5889c2eb85aca0a.tar.xz
mailman2-f3b2c2c7523b5962164672b5b5889c2eb85aca0a.zip
A critical incompatibility between the DMARC Wrap Message action and
Python versions older than 2.6.x for some x <= 5 existed and caused Wrapped message to be shunted. This is fixed. (LP: #1316682)
Diffstat (limited to '')
-rw-r--r--Mailman/Message.py19
-rw-r--r--Mailman/Version.py4
-rwxr-xr-xNEWS6
3 files changed, 26 insertions, 3 deletions
diff --git a/Mailman/Message.py b/Mailman/Message.py
index 5d68e7ef..20610dc7 100644
--- a/Mailman/Message.py
+++ b/Mailman/Message.py
@@ -59,6 +59,25 @@ class Generator(email.Generator.Generator):
return self.__class__(fp, self._mangle_from_,
self.__children_maxheaderlen, self.__children_maxheaderlen)
+ # This is the _handle_message method with the fix for bug 7970.
+ def _handle_message(self, msg):
+ s = StringIO()
+ g = self.clone(s)
+ # The payload of a message/rfc822 part should be a multipart sequence
+ # of length 1. The zeroth element of the list should be the Message
+ # object for the subpart. Extract that object, stringify it, and
+ # write it out.
+ # Except, it turns out, when it's a string instead, which happens when
+ # and only when HeaderParser is used on a message of mime type
+ # message/rfc822. Such messages are generated by, for example,
+ # Groupwise when forwarding unadorned messages. (Issue 7970.) So
+ # in that case we just emit the string body.
+ payload = msg.get_payload()
+ if isinstance(payload, list):
+ g.flatten(msg.get_payload(0), unixfrom=False)
+ payload = s.getvalue()
+ self._fp.write(payload)
+
class Message(email.Message.Message):
diff --git a/Mailman/Version.py b/Mailman/Version.py
index 30036394..f39931cc 100644
--- a/Mailman/Version.py
+++ b/Mailman/Version.py
@@ -16,7 +16,7 @@
# USA.
# Mailman version
-VERSION = '2.1.18'
+VERSION = '2.1.18-1'
# And as a hex number in the manner of PY_VERSION_HEX
ALPHA = 0xa
@@ -31,7 +31,7 @@ MINOR_REV = 1
MICRO_REV = 18
REL_LEVEL = FINAL
# at most 15 beta releases!
-REL_SERIAL = 0
+REL_SERIAL = 1
HEX_VERSION = ((MAJOR_REV << 24) | (MINOR_REV << 16) | (MICRO_REV << 8) |
(REL_LEVEL << 4) | (REL_SERIAL << 0))
diff --git a/NEWS b/NEWS
index ad424982..26d9f9ef 100755
--- a/NEWS
+++ b/NEWS
@@ -5,10 +5,14 @@ Copyright (C) 1998-2014 by the Free Software Foundation, Inc.
Here is a history of user visible changes to Mailman.
-2.1.19 (xx-xxx-xxxx)
+2.1.18-1 (06-May-2014)
Bug fixes and other patches
+ - A critical incompatibility between the DMARC Wrap Message action and
+ Python versions older than 2.6.x for some x <= 5 existed and caused
+ Wrapped message to be shunted. This is fixed. (LP: #1316682)
+
- Sender: headers are no longer removed in from_is_list Munge From
actions. (LP: #1315970)