[prev in list] [next in list] [prev in thread] [next in thread]
List: mailman-cvs
Subject: [Mailman-checkins] [Branch ~mailman-coders/mailman/2.1] Rev 1730: Show match in hold reason for head
From: noreply () launchpad ! net
Date: 2017-12-10 0:19:20
Message-ID: 151286516029.8549.17303674805148498727.launchpad () ackee ! canonical ! com
[Download RAW message or body]
------------------------------------------------------------
revno: 1730
fixes bug: https://launchpad.net/bugs/1737371
committer: Mark Sapiro <mark@msapiro.net>
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-c=
oders/mailman/2.1/+edit-subscription
["revision-diff.txt" (revision-diff.txt)]
=== 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
Mailman-checkins@python.org
Unsubscribe: https://mail.python.org/mailman/options/mailman-checkins/mailman-cvs%40progressive-comp.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic