Merge authors:
Jim Popovitch (jimpop)
Related merge proposals:
https://code.launchpad.net/~jimpop/mailman/dmarc-moderation-addresses/+merge/359963
proposed by: Jim Popovitch (jimpop)
revno: 1804 [merge]
committer: Mark Sapiro
branch nick: 2.1
timestamp: Sat 2018-12-15 10:07:41 -0800
message:
Implement dmarc_moderation_addresses feature.
modified:
Mailman/Gui/Privacy.py
Mailman/Handlers/SpamDetect.py
Mailman/MailList.py
Mailman/Version.py
Mailman/versions.py
NEWS
--
lp:mailman/2.1
https://code.launchpad.net/~mailman-coders/mailman/2.1
Your team Mailman Checkins is subscribed to branch lp:mailman/2.1.
To unsubscribe from this branch go to
https://code.launchpad.net/~mailman-coders/mailman/2.1/+edit-subscription
=== modified file 'Mailman/Gui/Privacy.py'
--- Mailman/Gui/Privacy.py 2018-07-15 03:18:00 +
+++ Mailman/Gui/Privacy.py 2018-12-15 18:07:41 +
@@ -356,6 +356,21 @@
be sent to anyone who posts to this list from a domain
with a DMARC Reject%(quarantine)s Policy.""")),
+('dmarc_moderation_addresses', mm_cfg.EmailListEx, (10, WIDTH), 1,
+ _("""List of addresses (or regexps) whose posts should always apply
+ dmarc_moderation_action
+ regardless of any domain specific DMARC Policy."""),
+
+ _("""Postings from any of these addresses will automatically
+ apply any DMARC action mitigation. This can be utilized to
+ automatically wrap or munge postings from known addresses or
+ domains that might have policies rejecting external mail From:
+ themselves.
+
+ Add member addresses one per line; start the line with a ^
+ character to designate a regular expression match.""")),
+
('dmarc_wrapped_message_text', mm_cfg.Text, (10, WIDTH), 1,
_("""If dmarc_moderation_action applies and is Wrap Message,
and this text is provided, the text will be placed in a
=== modified file 'Mailman/Handlers/SpamDetect.py'
--- Mailman/Handlers/SpamDetect.py 2018-06-17 23:47:34 +
+++ Mailman/Handlers/SpamDetect.py 2018-12-01 04:13:12 +
@@ -109,7 +109,8 @@
msgdata['from_is_list'] = 0
dn, addr = parseaddr(msg.get('from'))
if addr and mlist.dmarc_moderation_action > 0:
-if Utils.IsDMARCProhibited(mlist, addr):
+if (mlist.GetPattern(addr, mlist.dmarc_moderation_addresses) or
+Utils.IsDMARCProhibited(mlist, addr)):
# Note that for dmarc_moderation_action, 0 = Accept,
#1 = Munge, 2 = Wrap, 3 = Reject, 4 = Discard
if mlist.dmarc_moderation_action == 1:
=== modified file 'Mailman/MailList.py'
--- Mailman/MailList.py 2018-06-21 16:23:09 +
+++ Mailman/MailList.py 2018-11-30 22:53:02 +
@@ -424,6 +424,7 @@
self.dmarc_none_moderation_action = (
mm_cfg.DEFAULT_DMARC_NONE_MODERATION_ACTION)
self.dmarc_moderation_notice = ''
+ self.dmarc_moderation_addresses = []
self.dmarc_wrapped_message_text = (
mm_cfg.DEFAULT_DMARC_WRAPPED_MESSAGE_TEXT)
self.equivalent_domains = (
=== modified file 'Mailman/Version.py'
--- Mailman/Version.py 2018-07-24 21:58:31 +
+++ Mailman/Version.py 2018-11-30 22:53:02 +
@@ -37,7 +37,7 @@
(REL_LEVEL << 4) | (REL_SERIAL << 0))
# config.pck schema version number
-DATA_FILE_VERSION = 110
+DATA_FILE_VERSION = 111
# qfile/*.db schema version number
QFILE_SCHEMA_VERSION = 3
=== modified file 'Mailman/versions.py'
--- Mailman/versions.py 2018-06-17 23:47:34 +
+++ Mailman/versions.py 2018-11-30 22:53:02 +
@@ -497,6 +497,7 @@
add_only_if_missing('dmarc_none_moderation_action',
mm_cfg.DEFAULT_DMARC_NONE_MODERATION_ACTION)
add_only_if_missing('dmarc_moderation_notice', '')
+add_only_if_missing('dmarc_moderation_addresses', [])
add_only_if_missing('dmarc_wrapped_message_text',
mm_cfg.DEFAULT_DMARC_WRAPPED_MESSAGE_TEXT)
add_only_if_missing('member_verbosity_threshold',
=== modified file 'NEWS'
--- NEWS 2018-11-28 20:03:48 +
+++ NEWS 2018-12-15 18:07:41 +
@@ -6,6 +6,14 @@
Here is a history of user visible changes to Mailman.
2.1.30 (xx-xxx.)
+
+ New Features
+
+- Thanks to Jim Popovitch, there is now a dmarc_moderation_addresses
+ list setting that can be used to apply dmarc_moderation_action to mail
+ From: addresses listed or matching listed regexps. This can be used
+ to modify mail to addresses that don't accept external mail From:
+ themselves.
Bug Fixes and other patches
___
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: