aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2014-04-25 22:15:07 -0700
committerMark Sapiro <mark@msapiro.net>2014-04-25 22:15:07 -0700
commitddbf9c2e7678bf19e05710ab25e47f3f6fe61de8 (patch)
tree126657522c9d4417a7c40f3aa882b2ecc5783d1b /Mailman/Handlers
parent47150e9ad6ffbdf9ae51691777056b4a57b7b6ff (diff)
downloadmailman2-ddbf9c2e7678bf19e05710ab25e47f3f6fe61de8.tar.gz
mailman2-ddbf9c2e7678bf19e05710ab25e47f3f6fe61de8.tar.xz
mailman2-ddbf9c2e7678bf19e05710ab25e47f3f6fe61de8.zip
The Reply-To: munging options weren't honored if there was no
from_is_list action. (LP: #1313010)
Diffstat (limited to 'Mailman/Handlers')
-rw-r--r--Mailman/Handlers/WrapMessage.py21
1 files changed, 9 insertions, 12 deletions
diff --git a/Mailman/Handlers/WrapMessage.py b/Mailman/Handlers/WrapMessage.py
index d9f4e04a..9678f6fd 100644
--- a/Mailman/Handlers/WrapMessage.py
+++ b/Mailman/Handlers/WrapMessage.py
@@ -42,18 +42,15 @@ 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're munging.
- if msgdata.get('from_is_list') == 1 or (mlist.from_is_list == 1 and
- msgdata.get('from_is_list') == 0):
- # Yes.
- a_h = msgdata.get('add_header')
- if a_h:
- if a_h.get('From'):
- del msg['from']
- msg['From'] = a_h.get('From')
- if a_h.get('Reply-To'):
- del msg['reply-to']
- msg['Reply-To'] = a_h.get('Reply-To')
+ # Now see if we need to add a From: and/or Reply-To: without wrapping.
+ a_h = msgdata.get('add_header')
+ if a_h:
+ if a_h.get('From'):
+ del msg['from']
+ msg['From'] = a_h.get('From')
+ if a_h.get('Reply-To'):
+ del msg['reply-to']
+ msg['Reply-To'] = a_h.get('Reply-To')
return
# There are various headers in msg that we don't want, so we basically