aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/MailList.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/MailList.py')
-rwxr-xr-xMailman/MailList.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py
index fdc3802a..cc1be3b5 100755
--- a/Mailman/MailList.py
+++ b/Mailman/MailList.py
@@ -915,6 +915,12 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin,
syslog('vette', '%s banned subscription: %s%s (Spamhaus IP)',
realname, email, whence)
raise Errors.MembershipIsBanned, 'Spamhaus IP'
+ # See if this is from a spamhaus listed domain.
+ if email and mm_cfg.BLOCK_SPAMHAUS_LISTED_DBL_SUBSCRIBE:
+ if Utils.banned_domain(email):
+ syslog('vette', '%s banned subscription: %s (Spamhaus DBL)',
+ realname, email)
+ raise Errors.MembershipIsBanned, 'Spamhaus DBL'
# Sanity check the digest flag
if digest and not self.digestable:
raise Errors.MMCantDigestError
@@ -1069,6 +1075,7 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin,
"adminsubscribeack.txt",
{"listname" : realname,
"member" : formataddr((name, email)),
+ "whence" : "" if whence is None else "(" + whence + ")"
}, mlist=self)
msg = Message.OwnerNotification(self, subject, text)
msg.send(self)
@@ -1105,6 +1112,7 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin,
'adminunsubscribeack.txt',
{'member' : name,
'listname': self.real_name,
+ "whence" : "" if whence is None else "(" + whence + ")"
}, mlist=self)
msg = Message.OwnerNotification(self, subject, text)
msg.send(self)