summaryrefslogtreecommitdiff
path: root/Mailman/Handlers/CleanseDKIM.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/Handlers/CleanseDKIM.py')
-rw-r--r--Mailman/Handlers/CleanseDKIM.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/Mailman/Handlers/CleanseDKIM.py b/Mailman/Handlers/CleanseDKIM.py
index 8abdbb972..9dee4fcb0 100644
--- a/Mailman/Handlers/CleanseDKIM.py
+++ b/Mailman/Handlers/CleanseDKIM.py
@@ -25,9 +25,12 @@ and it will also give the MTA the opportunity to regenerate valid keys
originating at the Mailman server for the outgoing message.
"""
+from Mailman.configuration import config
+
def process(mlist, msg, msgdata):
- del msg['domainkey-signature']
- del msg['dkim-signature']
- del msg['authentication-results']
+ if config.REMOVE_DKIM_HEADERS:
+ del msg['domainkey-signature']
+ del msg['dkim-signature']
+ del msg['authentication-results']