From ac22662b811ac9bcf58cf001c8fd5ad21e757c8b Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Sun, 11 Jan 2015 14:03:43 -0800 Subject: 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. --- Mailman/Handlers/CookHeaders.py | 17 +++++++++++++---- 1 file 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. -- cgit v1.2.3