diff --git a/core/admin/mailu/models.py b/core/admin/mailu/models.py index 987a1ad9..920008fd 100644 --- a/core/admin/mailu/models.py +++ b/core/admin/mailu/models.py @@ -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