diff options
author | Yasuhito FUTATSUKI at POEM <futatuki@poem.co.jp> | 2016-05-27 13:24:56 +0900 |
---|---|---|
committer | Yasuhito FUTATSUKI at POEM <futatuki@poem.co.jp> | 2016-05-27 13:24:56 +0900 |
commit | 1b15d9c70316f03333f83ad5987462745e6860fa (patch) | |
tree | 19d6f870817729cc130e8e87b96a8d69469da13d /Mailman | |
parent | 6aba267b47a6db8ca28d805724b25f11dfcf29e4 (diff) | |
parent | c08fa7a5a3379f6ac9d534fa781fa46de17ff90e (diff) | |
download | mailman2-1b15d9c70316f03333f83ad5987462745e6860fa.tar.gz mailman2-1b15d9c70316f03333f83ad5987462745e6860fa.tar.xz mailman2-1b15d9c70316f03333f83ad5987462745e6860fa.zip |
Merge lp:mailman/2.1 rev 1655, rev 1656
Diffstat (limited to 'Mailman')
-rwxr-xr-x | Mailman/Defaults.py.in | 4 | ||||
-rw-r--r-- | Mailman/Handlers/CleanseDKIM.py | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/Mailman/Defaults.py.in b/Mailman/Defaults.py.in index 3569cc07..4ae5633f 100755 --- a/Mailman/Defaults.py.in +++ b/Mailman/Defaults.py.in @@ -616,8 +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 -> 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 2cfb07af..3e70313b 100644 --- a/Mailman/Handlers/CleanseDKIM.py +++ b/Mailman/Handlers/CleanseDKIM.py @@ -1,4 +1,4 @@ -# Copyright (C) 2006-2015 by the Free Software Foundation, Inc. +# Copyright (C) 2006-2016 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 @@ -43,6 +43,13 @@ def process(mlist, msg, msgdata): ) ): return + if (mm_cfg.REMOVE_DKIM_HEADERS == 3): + 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'] |