diff options
-rwxr-xr-x | Mailman/Defaults.py.in | 5 | ||||
-rw-r--r-- | Mailman/Handlers/CleanseDKIM.py | 12 | ||||
-rw-r--r-- | NEWS | 4 |
3 files changed, 13 insertions, 8 deletions
diff --git a/Mailman/Defaults.py.in b/Mailman/Defaults.py.in index 5dd0b30b..4ae5633f 100755 --- a/Mailman/Defaults.py.in +++ b/Mailman/Defaults.py.in @@ -616,9 +616,10 @@ NNTP_REWRITE_DUPLICATE_HEADERS = [ # broken and even if the outgoing message is resigned. However, some sites # may wish to remove these headers. Possible values and meanings are: # No, 0, False -> do not remove headers. -# Yes, 1, True -> remove headers only if the list's from_is_list setting is 1. +# Yes, 1, True -> remove headers only if we are munging the from header due +# to from_is_list or dmarc_moderation_action. # 2 -> always remove headers. -# 3 -> rename and preserve original DKIM headers. +# 3 -> always remove, rename and preserve original DKIM headers. REMOVE_DKIM_HEADERS = No # All `normal' messages which are delivered to the entire list membership go diff --git a/Mailman/Handlers/CleanseDKIM.py b/Mailman/Handlers/CleanseDKIM.py index bed67666..d74db7fe 100644 --- a/Mailman/Handlers/CleanseDKIM.py +++ b/Mailman/Handlers/CleanseDKIM.py @@ -44,12 +44,12 @@ def process(mlist, msg, msgdata): ): return if (mm_cfg.REMOVE_DKIM_HEADERS == 3): - if 'domainkey-signature' in msg: - msg['X-Mailman-Original-DomainKey-Signature'] = msg['domainkey-signature'] - if 'dkim-signature' in msg: - msg['X-Mailman-Original-DKIM-Signature'] = msg['dkim-signature'] - if 'authentication-results' in msg: - msg['X-Mailman-Original-Authentication-Results'] = msg['authentication-results'] + for value in msg.get_all('domainkey-signature', []): + msg['X-Mailman-Original-DomainKey-Signature'] = value + for value in msg.get_all('dkim-signature', []): + msg['X-Mailman-Original-DKIM-Signature'] = value + for value in msg.get_all('authentication-results', []): + msg['X-Mailman-Original-Authentication-Results'] = value del msg['domainkey-signature'] del msg['dkim-signature'] del msg['authentication-results'] @@ -9,6 +9,10 @@ Here is a history of user visible changes to Mailman. New Features + - Thanks to Jim Popovitch REMOVE_DKIM_HEADERS can now be set to 3 to + preserve the original headers as X-Mailman-Original-... before removing + them. + - Several additional templates have been added to those that can be edited via the web admin GUI. (LP: #1583387) |