mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-21 03:02:09 +00:00
Resuse internal dns query method to wrap errors
This commit is contained in:
parent
4f14460453
commit
14f7ef6b20
@ -421,7 +421,7 @@ def query_dns_ptr(qname):
|
|||||||
rr = rrset[0]
|
rr = rrset[0]
|
||||||
if rr.rdtype != dns.rdatatype.SOA:
|
if rr.rdtype != dns.rdatatype.SOA:
|
||||||
authority = rr.target
|
authority = rr.target
|
||||||
nameserver = resolver.query(authority).rrset[0].to_text()
|
nameserver = query_dns(authority, "A")
|
||||||
|
|
||||||
# Resolve the PTR record using the proper name server
|
# Resolve the PTR record using the proper name server
|
||||||
return query_dns(qname, "PTR", at=nameserver)
|
return query_dns(qname, "PTR", at=nameserver)
|
||||||
|
Loading…
Reference in New Issue
Block a user