From 9b8cf403719c083270b2d51a0aac22e120355522 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Thu, 18 Jul 2013 20:49:20 -0700 Subject: First cut at the author_is_list feature. --- Mailman/Handlers/CleanseDKIM.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'Mailman/Handlers/CleanseDKIM.py') 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'] -- cgit v1.2.3 From 037acd8e92f42f86f5086a570a23466c128fc480 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Fri, 19 Jul 2013 12:24:22 -0700 Subject: Second cut at the author_is_list feature. --- Mailman/Handlers/CleanseDKIM.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Mailman/Handlers/CleanseDKIM.py') diff --git a/Mailman/Handlers/CleanseDKIM.py b/Mailman/Handlers/CleanseDKIM.py index 3a157890..c492a096 100644 --- a/Mailman/Handlers/CleanseDKIM.py +++ b/Mailman/Handlers/CleanseDKIM.py @@ -31,7 +31,9 @@ from Mailman import mm_cfg def process(mlist, msg, msgdata): if not mm_cfg.REMOVE_DKIM_HEADERS: return - if mm_cfg.REMOVE_DKIM_HEADERS == 1 and not mlist.author_is_list: + if (mm_cfg.ALLOW_AUTHOR_IS_LIST and + mm_cfg.REMOVE_DKIM_HEADERS == 1 and + not mlist.author_is_list): return del msg['domainkey-signature'] del msg['dkim-signature'] -- cgit v1.2.3 From 5391cce1af71723b92bafc2419cec962f1e3ece3 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Fri, 27 Sep 2013 16:33:35 -0700 Subject: Made author_is_list a 3-way with an option to wrap the message. --- Mailman/Handlers/CleanseDKIM.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Mailman/Handlers/CleanseDKIM.py') diff --git a/Mailman/Handlers/CleanseDKIM.py b/Mailman/Handlers/CleanseDKIM.py index c492a096..809bae9b 100644 --- a/Mailman/Handlers/CleanseDKIM.py +++ b/Mailman/Handlers/CleanseDKIM.py @@ -33,7 +33,7 @@ def process(mlist, msg, msgdata): return if (mm_cfg.ALLOW_AUTHOR_IS_LIST and mm_cfg.REMOVE_DKIM_HEADERS == 1 and - not mlist.author_is_list): + mlist.author_is_list != 1): return del msg['domainkey-signature'] del msg['dkim-signature'] -- cgit v1.2.3 From 2d8a570e69262584f838526a01df91a3c37de3ad Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Sat, 28 Sep 2013 16:08:15 -0700 Subject: Renamed author_is_list to from_is_list. --- Mailman/Handlers/CleanseDKIM.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Mailman/Handlers/CleanseDKIM.py') diff --git a/Mailman/Handlers/CleanseDKIM.py b/Mailman/Handlers/CleanseDKIM.py index 809bae9b..0df2d97f 100644 --- a/Mailman/Handlers/CleanseDKIM.py +++ b/Mailman/Handlers/CleanseDKIM.py @@ -31,9 +31,9 @@ from Mailman import mm_cfg def process(mlist, msg, msgdata): if not mm_cfg.REMOVE_DKIM_HEADERS: return - if (mm_cfg.ALLOW_AUTHOR_IS_LIST and + if (mm_cfg.ALLOW_FROM_IS_LIST and mm_cfg.REMOVE_DKIM_HEADERS == 1 and - mlist.author_is_list != 1): + mlist.from_is_list != 1): return del msg['domainkey-signature'] del msg['dkim-signature'] -- cgit v1.2.3