aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers/CleanseDKIM.py
diff options
context:
space:
mode:
authorJim Popovitch <jimpop@gmail.com>2013-11-17 01:56:29 +0000
committerJim Popovitch <jimpop@gmail.com>2013-11-17 01:56:29 +0000
commit06d15b0a9949652f696d19903cef2a235ff3a428 (patch)
tree55a9c12de799cc056da986aafe3b8e66d0cbf94b /Mailman/Handlers/CleanseDKIM.py
parentbc05ad4e81bd2ce9ec0f36e5112eadf607a49195 (diff)
parentded18dda2b2f9ba00f8780b4eba6c398c5bff838 (diff)
downloadmailman2-06d15b0a9949652f696d19903cef2a235ff3a428.tar.gz
mailman2-06d15b0a9949652f696d19903cef2a235ff3a428.tar.xz
mailman2-06d15b0a9949652f696d19903cef2a235ff3a428.zip
Upstream changes
Diffstat (limited to '')
-rw-r--r--Mailman/Handlers/CleanseDKIM.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/Mailman/Handlers/CleanseDKIM.py b/Mailman/Handlers/CleanseDKIM.py
index c4b06613..0df2d97f 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,13 @@ 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.ALLOW_FROM_IS_LIST and
+ mm_cfg.REMOVE_DKIM_HEADERS == 1 and
+ mlist.from_is_list != 1):
+ return
+ del msg['domainkey-signature']
+ del msg['dkim-signature']
+ del msg['authentication-results']