aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/Handlers')
-rw-r--r--Mailman/Handlers/Cleanse.py3
-rw-r--r--Mailman/Handlers/CleanseDKIM.py4
-rwxr-xr-xMailman/Handlers/CookHeaders.py3
3 files changed, 7 insertions, 3 deletions
diff --git a/Mailman/Handlers/Cleanse.py b/Mailman/Handlers/Cleanse.py
index 678f6b56..c1b500e5 100644
--- a/Mailman/Handlers/Cleanse.py
+++ b/Mailman/Handlers/Cleanse.py
@@ -21,6 +21,7 @@ import re
from email.Utils import formataddr, getaddresses, parseaddr
+from Mailman import mm_cfg
from Mailman.Utils import unique_message_id
from Mailman.Logging.Syslog import syslog
from Mailman.Handlers.CookHeaders import uheader
@@ -40,7 +41,7 @@ def process(mlist, msg, msgdata):
del msg['urgent']
# Do we change the from so the list takes ownership of the email
# This really belongs in CookHeaders.
- if mlist.author_is_list:
+ if mm_cfg.ALLOW_AUTHOR_IS_LIST and mlist.author_is_list:
realname, email = parseaddr(msg['from'])
replies = getaddresses(msg.get('reply-to', ''))
reply_addrs = [x[1].lower() for x in replies]
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']
diff --git a/Mailman/Handlers/CookHeaders.py b/Mailman/Handlers/CookHeaders.py
index 7455dcc6..71534c11 100755
--- a/Mailman/Handlers/CookHeaders.py
+++ b/Mailman/Handlers/CookHeaders.py
@@ -160,7 +160,8 @@ def process(mlist, msg, msgdata):
# is already in From and Reply-To in this case and similarly for
# an 'author is list' list.
if mlist.personalize == 2 and mlist.reply_goes_to_list <> 1 \
- and not mlist.anonymous_list and not mlist.author_is_list:
+ and not mlist.anonymous_list and not (mlist.author_is_list and
+ mm_cfg.ALLOW_AUTHOR_IS_LIST):
# Watch out for existing Cc headers, merge, and remove dups. Note
# that RFC 2822 says only zero or one Cc header is allowed.
new = []