there too

This commit is contained in:
Florent Daigniere
2022-01-21 15:01:23 +01:00
parent 27d917e3f1
commit b9e614145f

View File

@@ -324,7 +324,7 @@ class Domain(Base):
hostnames = set(app.config['HOSTNAMES'].split(','))
return any(
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:
return False