aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers/CleanseDKIM.py
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2013-07-18 20:49:20 -0700
committerMark Sapiro <mark@msapiro.net>2013-07-18 20:49:20 -0700
commit9b8cf403719c083270b2d51a0aac22e120355522 (patch)
tree3aff142848d1c3d60aa044e29c6d1c549174fb91 /Mailman/Handlers/CleanseDKIM.py
parentcb2733e029d419904f0fc488f5989beb3aa3ce71 (diff)
downloadmailman2-9b8cf403719c083270b2d51a0aac22e120355522.tar.gz
mailman2-9b8cf403719c083270b2d51a0aac22e120355522.tar.xz
mailman2-9b8cf403719c083270b2d51a0aac22e120355522.zip
First cut at the author_is_list feature.
Diffstat (limited to '')
-rw-r--r--Mailman/Handlers/CleanseDKIM.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/Mailman/Handlers/CleanseDKIM.py b/Mailman/Handlers/CleanseDKIM.py
index c4b06613..3a157890 100644
--- a/Mailman/Handlers/CleanseDKIM.py
+++ b/Mailman/Handlers/CleanseDKIM.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2007 by the Free Software Foundation, Inc.
+# Copyright (C) 2006-2013 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
@@ -29,8 +29,11 @@ from Mailman import mm_cfg
def process(mlist, msg, msgdata):
- if mm_cfg.REMOVE_DKIM_HEADERS:
- del msg['domainkey-signature']
- del msg['dkim-signature']
- del msg['authentication-results']
+ if not mm_cfg.REMOVE_DKIM_HEADERS:
+ return
+ if mm_cfg.REMOVE_DKIM_HEADERS == 1 and not mlist.author_is_list:
+ return
+ del msg['domainkey-signature']
+ del msg['dkim-signature']
+ del msg['authentication-results']