mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-20 06:08:35 +02:00
mitigate spamhaus dns fail while querying for dnsbl
This commit is contained in:
@@ -79,6 +79,9 @@ class CheckMXRecords(BaseCommand):
|
||||
pattern = "{}.{}.".format(reverse, provider)
|
||||
try:
|
||||
result = socket.gethostbyname(pattern)
|
||||
#Mitigate Spamhaus status error (these codes don't mean ip is listed)
|
||||
if result == "127.255.255.254" or result == "127.255.255.255":
|
||||
result = False
|
||||
except socket.gaierror:
|
||||
result = False
|
||||
for mx in mxs:
|
||||
|
||||
Reference in New Issue
Block a user