there too

master
Florent Daigniere 3 years ago
parent 27d917e3f1
commit b9e614145f

@ -324,7 +324,7 @@ class Domain(Base):
hostnames = set(app.config['HOSTNAMES'].split(',')) hostnames = set(app.config['HOSTNAMES'].split(','))
return any( return any(
rset.exchange.to_text().rstrip('.') in hostnames rset.exchange.to_text().rstrip('.') in hostnames
for rset in dns.resolver.query(self.name, 'MX') for rset in dns.resolver.resolve(self.name, 'MX')
) )
except dns.exception.DNSException: except dns.exception.DNSException:
return False return False

Loading…
Cancel
Save