mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Only diagnose basic records for subdomains
This commit is contained in:
parent
ecce6f11cc
commit
f032ba16cc
1 changed files with 7 additions and 4 deletions
|
@ -28,21 +28,24 @@ class DNSRecordsDiagnoser(Diagnoser):
|
|||
all_domains = domain_list()["domains"]
|
||||
for domain in all_domains:
|
||||
self.logger_debug("Diagnosing DNS conf for %s" % domain)
|
||||
for report in self.check_domain(domain, domain == main_domain):
|
||||
is_subdomain = domain.split(".",1)[1] in all_domains
|
||||
for report in self.check_domain(domain, domain == main_domain, is_subdomain=is_subdomain):
|
||||
yield report
|
||||
|
||||
# FIXME : somewhere, should implement a check for reverse DNS ...
|
||||
|
||||
# FIXME / TODO : somewhere, could also implement a check for domain expiring soon
|
||||
|
||||
def check_domain(self, domain, is_main_domain):
|
||||
def check_domain(self, domain, is_main_domain, is_subdomain):
|
||||
|
||||
expected_configuration = _build_dns_conf(domain)
|
||||
|
||||
# Here if there are no AAAA record, we should add something to expect "no" AAAA record
|
||||
# FIXME: Here if there are no AAAA record, we should add something to expect "no" AAAA record
|
||||
# to properly diagnose situations where people have a AAAA record but no IPv6
|
||||
|
||||
categories = ["basic", "mail", "xmpp", "extra"]
|
||||
if is_subdomain:
|
||||
categories = ["basic"]
|
||||
|
||||
for category in categories:
|
||||
|
||||
records = expected_configuration[category]
|
||||
|
|
Loading…
Add table
Reference in a new issue