aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/MailList.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/MailList.py')
-rwxr-xr-xMailman/MailList.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py
index 619c3206..ecd6ce5c 100755
--- a/Mailman/MailList.py
+++ b/Mailman/MailList.py
@@ -908,6 +908,13 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin,
syslog('vette', '%s banned subscription: %s%s (matched: %s)',
realname, email, whence, pattern)
raise Errors.MembershipIsBanned, pattern
+ # See if this is from a spamhaus listed IP.
+ if remote and BLOCK_SPAMHAUS_LISTED_IP_SUBSCRIBE:
+ if Utils.banned_ip(remote):
+ whence = ' from %s' % remote
+ syslog('vette', '%s banned subscription: %s%s (Spamhaus IP)',
+ realname, email, whence)
+ raise Errors.MembershipIsBanned, pattern
# Sanity check the digest flag
if digest and not self.digestable:
raise Errors.MMCantDigestError