aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman')
-rwxr-xr-xMailman/Defaults.py.in1
-rw-r--r--Mailman/Handlers/CleanseDKIM.py7
2 files changed, 8 insertions, 0 deletions
diff --git a/Mailman/Defaults.py.in b/Mailman/Defaults.py.in
index 3569cc07..5dd0b30b 100755
--- a/Mailman/Defaults.py.in
+++ b/Mailman/Defaults.py.in
@@ -618,6 +618,7 @@ NNTP_REWRITE_DUPLICATE_HEADERS = [
# No, 0, False -> do not remove headers.
# Yes, 1, True -> remove headers only if the list's from_is_list setting is 1.
# 2 -> always remove headers.
+# 3 -> 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..bed67666 100644
--- a/Mailman/Handlers/CleanseDKIM.py
+++ b/Mailman/Handlers/CleanseDKIM.py
@@ -43,6 +43,13 @@ 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']
del msg['domainkey-signature']
del msg['dkim-signature']
del msg['authentication-results']