aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2015-01-11 14:03:43 -0800
committerMark Sapiro <mark@msapiro.net>2015-01-11 14:03:43 -0800
commitac22662b811ac9bcf58cf001c8fd5ad21e757c8b (patch)
tree9ca6cbf21543ce65d664d45d5189916ffb35aa1c
parent166ea4ff90ee31e7cb702dc12b9d108dac773d9e (diff)
downloadmailman2-ac22662b811ac9bcf58cf001c8fd5ad21e757c8b.tar.gz
mailman2-ac22662b811ac9bcf58cf001c8fd5ad21e757c8b.tar.xz
mailman2-ac22662b811ac9bcf58cf001c8fd5ad21e757c8b.zip
Due to a prior change, From: header munging would unnecessarily add the
original From: to Cc: when was already in an original Reply-To:. Fixed.
-rwxr-xr-xMailman/Handlers/CookHeaders.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/Mailman/Handlers/CookHeaders.py b/Mailman/Handlers/CookHeaders.py
index 30e05655..236f39f1 100755
--- a/Mailman/Handlers/CookHeaders.py
+++ b/Mailman/Handlers/CookHeaders.py
@@ -206,10 +206,19 @@ def process(mlist, msg, msgdata):
# We also need to put the old From: in Reply-To: in all cases where
# it is not going in Cc:. This is when reply_goes_to_list == 0 and
# either there was no original Reply-To: or we stripped it.
- if o_from and mlist.reply_goes_to_list == 0 and not o_rt:
- add(o_from)
- # Flag that we added it.
- o_from = None
+ # However, if there was an original Reply-To:, unstripped, and it
+ # contained the original From: address we need to flag that it's
+ # there so we don't add the original From: to Cc:
+ if o_from and mlist.reply_goes_to_list == 0:
+ if o_rt:
+ if d.has_key(o_from[1].lower()):
+ # Original From: address is in original Reply-To:.
+ # Pretend we added it.
+ o_from = None
+ else:
+ add(o_from)
+ # Flag that we added it.
+ o_from = None
# Set Reply-To: header to point back to this list. Add this last
# because some folks think that some MUAs make it easier to delete
# addresses from the right than from the left.