------------------------------------------------------------
revno: 1267
committer: Mark Sapiro <[email protected]>
branch nick: 2.2
timestamp: Fri 2013-07-19 12:39:28 -0700
message:
Second cut at the author_is_list feature.
modified:
Mailman/Defaults.py.in
Mailman/Gui/General.py
Mailman/Handlers/Cleanse.py
Mailman/Handlers/CleanseDKIM.py
Mailman/Handlers/CookHeaders.py
NEWS
--
lp:mailman/2.2
https://code.launchpad.net/~mailman-coders/mailman/2.2
Your team Mailman Checkins is subscribed to branch lp:mailman/2.2.
To unsubscribe from this branch go to
https://code.launchpad.net/~mailman-coders/mailman/2.2/+edit-subscription
=== modified file 'Mailman/Defaults.py.in'
--- Mailman/Defaults.py.in 2013-07-19 06:00:51 +0000
+++ Mailman/Defaults.py.in 2013-07-19 19:39:28 +0000
@@ -108,6 +108,10 @@
# expire that many seconds following their last use.
AUTHENTICATION_COOKIE_LIFETIME = 0
+# The following must be set to Yes to enable the 'author is list' feature.
+# See DEFAULT_AUTHOR_IS_LIST below.
+ALLOW_AUTHOR_IS_LIST = No
+
# Form lifetime is set against Cross Site Request Forgery.
FORM_LIFETIME = hours(1)
=== modified file 'Mailman/Gui/General.py'
--- Mailman/Gui/General.py 2013-07-19 06:00:51 +0000
+++ Mailman/Gui/General.py 2013-07-19 19:39:28 +0000
@@ -153,15 +153,21 @@
directive. eg.; [listname %%d] -> [listname 123]
(listname %%05d) -> (listname 00123)
""")),
-
- ('author_is_list', mm_cfg.Radio, (_('No'), _('Yes')), 0,
- _("""Replace the sender with the list address to conform with
- policies like ADSP and DMARC. It replaces the poster's address
- in the From: header with the list address and adds the poster to
- the Reply-To: header, but the anonymous_list and Reply-To: header
- munging settings below take priority. If setting this to Yes,
- it is advised to set the MTA to DKIM sign all emails.""")),
-
+ ]
+
+ if mm_cfg.ALLOW_AUTHOR_IS_LIST:
+ rtn.append(
+ ('author_is_list', mm_cfg.Radio, (_('No'), _('Yes')), 0,
+ _("""Replace the sender with the list address to conform with
+ policies like ADSP and DMARC. It replaces the poster's
+ address in the From: header with the list address and adds the
+ poster to the Reply-To: header, but the anonymous_list and
+ Reply-To: header munging settings below take priority. If
+ setting this to Yes, it is advised to set the MTA to DKIM sign
+ all emails."""))
+ )
+
+ rtn.extend([
('anonymous_list', mm_cfg.Radio, (_('No'), _('Yes')), 0,
_("""Hide the sender of a message, replacing it with the list
address (Removes From, Sender and Reply-To fields)""")),
@@ -382,7 +388,7 @@
useful for selecting among alternative names of a host that has
multiple addresses.""")),
- ]
+ ])
if mm_cfg.ALLOW_RFC2369_OVERRIDES:
rtn.append(
=== modified file 'Mailman/Handlers/Cleanse.py'
--- Mailman/Handlers/Cleanse.py 2013-07-19 06:00:51 +0000
+++ Mailman/Handlers/Cleanse.py 2013-07-19 19:39:28 +0000
@@ -21,6 +21,7 @@
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 @@
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]
=== modified file 'Mailman/Handlers/CleanseDKIM.py'
--- Mailman/Handlers/CleanseDKIM.py 2013-07-19 06:00:51 +0000
+++ Mailman/Handlers/CleanseDKIM.py 2013-07-19 19:39:28 +0000
@@ -31,7 +31,9 @@
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']
=== modified file 'Mailman/Handlers/CookHeaders.py'
--- Mailman/Handlers/CookHeaders.py 2013-07-19 06:00:51 +0000
+++ Mailman/Handlers/CookHeaders.py 2013-07-19 19:39:28 +0000
@@ -160,7 +160,8 @@
# 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 = []
=== modified file 'NEWS'
--- NEWS 2013-07-19 06:00:51 +0000
+++ NEWS 2013-07-19 19:39:28 +0000
@@ -58,7 +58,8 @@
compatability with DMARC and or ADSP. There is a new mm_cfg.py setting
DEFAULT_AUTHOR_IS_LIST to control the default for new lists, and the
existing REMOVE_DKIM_HEADERS setting has been extended to allow removing
- those headers only for author_is_list = Yes lists.
+ those headers only for author_is_list = Yes lists. This feature must be
+ enabled by setting ALLOW_AUTHOR_IS_LIST to Yes in mm_cfg.py.
- There is a new DISPLAY_HELD_SUMMARY_SORT_BUTTONS setting which if set
to Yes in mm_cfg.py will display a set of radio buttons in the admindb
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org