aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2015-04-15 13:31:01 -0700
committerMark Sapiro <mark@msapiro.net>2015-04-15 13:31:01 -0700
commitbaee4f8a34ab3ababaede13d00ae0467abee1f99 (patch)
treee886d2d204ba56aaefdf7f2c0805e7b3ae195e9c /Mailman
parent0872fe8ebdb83e2f864c94201b57121e20c3fb7d (diff)
downloadmailman2-baee4f8a34ab3ababaede13d00ae0467abee1f99.tar.gz
mailman2-baee4f8a34ab3ababaede13d00ae0467abee1f99.tar.xz
mailman2-baee4f8a34ab3ababaede13d00ae0467abee1f99.zip
DKIM-Signature:, DomainKey-Signature: and Authentication-Results:
headers are now removed by default from posts to anonymous lists.
Diffstat (limited to 'Mailman')
-rw-r--r--Mailman/Handlers/CleanseDKIM.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/Mailman/Handlers/CleanseDKIM.py b/Mailman/Handlers/CleanseDKIM.py
index 2be1351a..2cfb07af 100644
--- a/Mailman/Handlers/CleanseDKIM.py
+++ b/Mailman/Handlers/CleanseDKIM.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2014 by the Free Software Foundation, Inc.
+# Copyright (C) 2006-2015 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,9 +29,15 @@ from Mailman import mm_cfg
def process(mlist, msg, msgdata):
- if not mm_cfg.REMOVE_DKIM_HEADERS:
+ if not (mm_cfg.REMOVE_DKIM_HEADERS or mlist.anonymous_list):
+ # We want to remove these headers from posts to anonymous lists.
+ # There can be interaction with the next test, but anonymous_list
+ # and Munge From are not compatible anyway, so don't worry.
return
if (mm_cfg.REMOVE_DKIM_HEADERS == 1 and not
+ # The following means 'Munge From' applies to this message.
+ # So this whole stanza means if RDH is 1 and we're not Munging,
+ # return and don't remove the headers. See Defaults.py.
(msgdata.get('from_is_list') == 1 or
(mlist.from_is_list == 1 and msgdata.get('from_is_list') != 2)
)