mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-07-07 23:50:55 +00:00
Merge fed6998945
into aee653a7d9
This commit is contained in:
commit
7850f68134
@ -585,7 +585,11 @@ def check_dns_zone(domain, env, output, dns_zonefiles):
|
||||
# Choose the first IP if nameserver returns multiple
|
||||
ns_ip = ns_ips.split('; ')[0]
|
||||
|
||||
checkSOA = True
|
||||
# No need to check if we could not obtain the SOA record
|
||||
if SOARecord == '[timeout]':
|
||||
checkSOA = False
|
||||
else:
|
||||
checkSOA = True
|
||||
|
||||
# Now query it to see what it says about this domain.
|
||||
ip = query_dns(domain, "A", at=ns_ip, nxdomain=None)
|
||||
@ -607,10 +611,10 @@ def check_dns_zone(domain, env, output, dns_zonefiles):
|
||||
|
||||
if SOARecord == SOASecondary:
|
||||
output.print_ok(f"Secondary nameserver {ns} has consistent SOA record.")
|
||||
elif SOARecord == '[Not Set]':
|
||||
elif SOASecondary == '[Not Set]':
|
||||
output.print_error(f"Secondary nameserver {ns} has no SOA record configured.")
|
||||
elif SOARecord == '[timeout]':
|
||||
output.print_error(f"Secondary nameserver {ns} timed out on checking SOA record.")
|
||||
elif SOASecondary == '[timeout]':
|
||||
output.print_warning(f"Secondary nameserver {ns} timed out on checking SOA record.")
|
||||
else:
|
||||
output.print_error(f"""Secondary nameserver {ns} has inconsistent SOA record (primary: {SOARecord} versus secondary: {SOASecondary}).
|
||||
Check that synchronization between secondary and primary DNS servers is properly set-up.""")
|
||||
|
Loading…
Reference in New Issue
Block a user