mirror of
https://github.com/simon987/nyaa.git
synced 2025-12-13 15:19:03 +00:00
config/forms: allow blacklisting email servers by IP (#518)
Adds a new config entry (EMAIL_SERVER_BLACKLIST, tuple of IPv4 addresses as strings) and an email validator for registering, which will query all the MX records for the domain and reject the registration if any of the A records for any of the MX records are found in the blacklist. If the query fails, the blacklist is ignored; the email is accepted.
This commit is contained in:
committed by
Arylide
parent
86b7eb7ccd
commit
8c892f09cc
@@ -59,6 +59,11 @@ EMAIL_BLACKLIST = (
|
||||
re.compile(r'(?i)@(msn\.com|passport\.(com|net))'),
|
||||
# '@dodgydomain.tk'
|
||||
)
|
||||
EMAIL_SERVER_BLACKLIST = (
|
||||
# Bad mailserver IPs here (MX server.com -> A mail.server.com > 11.22.33.44)
|
||||
# '1.2.3.4', '11.22.33.44'
|
||||
)
|
||||
|
||||
|
||||
|
||||
# Recaptcha keys (https://www.google.com/recaptcha)
|
||||
|
||||
Reference in New Issue
Block a user