------------------------------------------------------------
revno: 1730
fixes bug: https://launchpad.net/bugs/1737371
committer: Mark Sapiro <[email protected]>
branch nick: 2.1
timestamp: Sat 2017-12-09 16:17:47 -0800
message:
Show match in hold reason for header_filter_rules.
modified:
Mailman/Handlers/SpamDetect.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/Handlers/SpamDetect.py'
--- Mailman/Handlers/SpamDetect.py 2017-10-27 05:56:53 +0000
+++ Mailman/Handlers/SpamDetect.py 2017-12-10 00:17:47 +0000
@@ -56,7 +56,12 @@
"""The message contains known spam"""
class HeaderMatchHold(Errors.HoldMessage):
- reason = _('The message headers matched a filter rule')
+ def __init__(self, pattern):
+ self.__pattern = pattern
+
+ def reason_notice(self):
+ pattern = self.__pattern
+ return _('Header matched regexp: %(pattern)s')
# And reset the translator
@@ -195,6 +200,7 @@
# pass it here but list-owner can set this to be
# discarded on the GUI if he wants.
return
- hold_for_approval(mlist, msg, msgdata, HeaderMatchHold)
+ hold_for_approval(
+ mlist, msg, msgdata, HeaderMatchHold(pattern))
if action == mm_cfg.ACCEPT:
return
=== modified file 'NEWS'
--- NEWS 2017-11-23 17:39:51 +0000
+++ NEWS 2017-12-10 00:17:47 +0000
@@ -14,6 +14,9 @@
Bug fixes and other patches
+ - Messages held for header_filter_rules now show the matched regexp in
+ the hold reason. (LP: #1737371)
+
- When updating the group and mode of a .db file with Mailman's Postfix
integration, a missing file is ignored. (LP: #1734162)
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org