diff options
Diffstat (limited to '')
-rw-r--r-- | Mailman/Handlers/WrapMessage.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Mailman/Handlers/WrapMessage.py b/Mailman/Handlers/WrapMessage.py index 4fd88ed9..0e47e1e4 100644 --- a/Mailman/Handlers/WrapMessage.py +++ b/Mailman/Handlers/WrapMessage.py @@ -1,4 +1,4 @@ -# Copyright (C) 2013-2014 by the Free Software Foundation, Inc. +# Copyright (C) 2013-2015 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -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'): @@ -49,6 +50,9 @@ def process(mlist, msg, msgdata): if a_h.get('Reply-To'): del msg['reply-to'] msg['Reply-To'] = a_h.get('Reply-To') + if a_h.get('Cc'): + del msg['cc'] + msg['Cc'] = a_h.get('Cc') return # There are various headers in msg that we don't want, so we basically |