diff options
author | Mark Sapiro <mark@msapiro.net> | 2018-06-04 18:02:12 -0700 |
---|---|---|
committer | Mark Sapiro <mark@msapiro.net> | 2018-06-04 18:02:12 -0700 |
commit | b0fda7ec4f1927bae0f930500dea17294b5bbf20 (patch) | |
tree | 96432701160ac405b0b4646e5cb43a35d1df1d54 /Mailman/MailList.py | |
parent | e3da06f338f4ebf125de481bbad5ae7d2bf7a282 (diff) | |
download | mailman2-b0fda7ec4f1927bae0f930500dea17294b5bbf20.tar.gz mailman2-b0fda7ec4f1927bae0f930500dea17294b5bbf20.tar.xz mailman2-b0fda7ec4f1927bae0f930500dea17294b5bbf20.zip |
Added BLOCK_SPAMHAUS_LISTED_IP_SUBSCRIBE Feature
Diffstat (limited to '')
-rwxr-xr-x | Mailman/MailList.py | 7 |
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 |