aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/MailList.py
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2018-06-04 18:02:12 -0700
committerMark Sapiro <mark@msapiro.net>2018-06-04 18:02:12 -0700
commitb0fda7ec4f1927bae0f930500dea17294b5bbf20 (patch)
tree96432701160ac405b0b4646e5cb43a35d1df1d54 /Mailman/MailList.py
parente3da06f338f4ebf125de481bbad5ae7d2bf7a282 (diff)
downloadmailman2-b0fda7ec4f1927bae0f930500dea17294b5bbf20.tar.gz
mailman2-b0fda7ec4f1927bae0f930500dea17294b5bbf20.tar.xz
mailman2-b0fda7ec4f1927bae0f930500dea17294b5bbf20.zip
Added BLOCK_SPAMHAUS_LISTED_IP_SUBSCRIBE Feature
Diffstat (limited to '')
-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