aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2015-01-04 19:03:40 -0800
committerMark Sapiro <mark@msapiro.net>2015-01-04 19:03:40 -0800
commitc170b01eae9958bc6d0892e8227d2726f60362b7 (patch)
treec4d0c4d1ea94649f40a993909ad5f85d1fe091c6
parent85a6679a3ea5b1ff085453f4e1ed921b5320690b (diff)
downloadmailman2-c170b01eae9958bc6d0892e8227d2726f60362b7.tar.gz
mailman2-c170b01eae9958bc6d0892e8227d2726f60362b7.tar.xz
mailman2-c170b01eae9958bc6d0892e8227d2726f60362b7.zip
Add some explanitory comments for why we defer some Munge From changes
to WrapMessage. Correct a misplaced item in NEWS.
Diffstat (limited to '')
-rwxr-xr-xMailman/Handlers/CookHeaders.py5
-rw-r--r--Mailman/Handlers/WrapMessage.py5
-rwxr-xr-xNEWS4
3 files changed, 10 insertions, 4 deletions
diff --git a/Mailman/Handlers/CookHeaders.py b/Mailman/Handlers/CookHeaders.py
index 0139f3c3..30e05655 100755
--- a/Mailman/Handlers/CookHeaders.py
+++ b/Mailman/Handlers/CookHeaders.py
@@ -72,6 +72,11 @@ def change_header(name, value, mlist, msg, msgdata, delete=True, repl=True):
(msgdata.get('from_is_list') == 0 and mlist.from_is_list == 2)) and
not msgdata.get('_fasttrack')
) or name.lower() in ('from', 'reply-to', 'cc'):
+ # The or name.lower() in ... above is because when we are munging
+ # the From:, we want to defer the resultant changes to From:,
+ # Reply-To:, and/or Cc: until after the message passes through
+ # ToDigest, ToArchive and ToUsenet. Thus, we put them in
+ # msgdata[add_header] here and apply them in WrapMessage.
msgdata.setdefault('add_header', {})[name] = value
elif repl or not msg.has_key(name):
if delete:
diff --git a/Mailman/Handlers/WrapMessage.py b/Mailman/Handlers/WrapMessage.py
index fba6bc2a..0e47e1e4 100644
--- a/Mailman/Handlers/WrapMessage.py
+++ b/Mailman/Handlers/WrapMessage.py
@@ -18,7 +18,7 @@
"""Wrap the message in an outer message/rfc822 part and transfer/add
some headers from the original.
-Also, in the case of Munge From, replace the From: and Reply-To: in the
+Also, in the case of Munge From, replace the From:, Reply-To: and Cc: in the
original message.
"""
@@ -40,7 +40,8 @@ def process(mlist, msg, msgdata):
# is wrap this message or from_is_list applies and is wrap.
if not (msgdata.get('from_is_list') == 2 or
(mlist.from_is_list == 2 and msgdata.get('from_is_list') == 0)):
- # Now see if we need to add a From: and/or Reply-To: without wrapping.
+ # Now see if we need to add a From:, Reply-To: or Cc: without wrapping.
+ # See comments in CookHeaders.change_header for why we do this here.
a_h = msgdata.get('add_header')
if a_h:
if a_h.get('From'):
diff --git a/NEWS b/NEWS
index 7066b1e5..d1d8f0c5 100755
--- a/NEWS
+++ b/NEWS
@@ -7,12 +7,12 @@ Here is a history of user visible changes to Mailman.
2.1.19 (xx-xxx-xxxx)
+ New Features
+
- There is a new DEFAULT_SUBSCRIBE_OR_INVITE setting. Set this to Yes
to make the default selection on the admin Mass Subscriptions page
Invite rather than Subscribe. (LP: #1404511)
- New Features
-
- There is a new list attribute in the Bounce processing section.
bounce_notify_owner_on_bounce_increment if set to Yes will cause
Mailman to notify the list owner on every bounce that increments a