aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman')
-rwxr-xr-xMailman/Defaults.py.in8
-rwxr-xr-xMailman/MailList.py4
2 files changed, 11 insertions, 1 deletions
diff --git a/Mailman/Defaults.py.in b/Mailman/Defaults.py.in
index 9e9e93af..3bb9bc13 100755
--- a/Mailman/Defaults.py.in
+++ b/Mailman/Defaults.py.in
@@ -131,6 +131,14 @@ SUBSCRIBE_FORM_SECRET = None
# test.
SUBSCRIBE_FORM_MIN_TIME = seconds(5)
+# Installation wide ban list. This is a list, one entry per line, of email
+# addresses and regexp patterns (beginning with ^) which are not allowed to
+# subscribe to any lists in the installation. This supplements the individual
+# list's ban_list. For example, to ban xxx@aol.com and any @gmail.com address
+# beginning with yyy, set
+# GLOBAL_BAN_LIST = ['xxx@aol.com', '^yyy.*@gmail.com']
+GLOBAL_BAN_LIST = []
+
# Command that is used to convert text/html parts into plain text. This
# should output results to standard output. %(filename)s will contain the
# name of the temporary file that the program should operate on.
diff --git a/Mailman/MailList.py b/Mailman/MailList.py
index 6404666a..2095d107 100755
--- a/Mailman/MailList.py
+++ b/Mailman/MailList.py
@@ -1564,7 +1564,9 @@ bad regexp in bounce_matching_header line: %s
"""Returns matched entry in ban_list if email matches.
Otherwise returns None.
"""
- return self.GetPattern(email, self.ban_list)
+ return (self.GetPattern(email, self.ban_list) or
+ self.GetPattern(email, mm_cfg.GLOBAL_BAN_LIST)
+ )
def HasAutoApprovedSender(self, sender):
"""Returns True and logs if sender matches address or pattern