aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xMailman/MailList.py14
-rwxr-xr-xNEWS3
2 files changed, 15 insertions, 2 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py
index 3acd6294..b76dfa1f 100755
--- a/Mailman/MailList.py
+++ b/Mailman/MailList.py
@@ -1604,9 +1604,19 @@ bad regexp in bounce_matching_header line: %s
if re.search(pattern, email, re.IGNORECASE):
matched = pattern
break
- except re.error:
+ except re.error, e:
# BAW: we should probably remove this pattern
- pass
+ # The GUI won't add a bad regexp, but at least log it.
+ # The following kludge works because the ban_list stuff
+ # is the only caller with no at_list.
+ attr_name = at_list or 'ban_list'
+ syslog('error',
+ '%s in %s has bad regexp "%s": %s',
+ attr_name,
+ self.internal_name(),
+ pattern,
+ str(e)
+ )
elif at_list and pattern.startswith('@'):
# XXX Needs to be reviewed for list@domain names.
# this refers to the members of another list in this
diff --git a/NEWS b/NEWS
index 12dbf8fc..d468f076 100755
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,9 @@ Here is a history of user visible changes to Mailman.
Bug fixes and other patches
+ - Invalid regexps in *_these_nonmembers, subscribe_auto_approval and
+ ban_list are now logged. (LP: #1507241)
+
- Refactored the GetPattern list method to simplify extending @listname
syntax to new attributes in the future. Changed Moderate.py to use the
GetPattern method to process the *_these_nonmembers lists.