From 1cab5a6d4be7817bbb79b3cfa93da69cebe9b3e8 Mon Sep 17 00:00:00 2001 From: Scott Bronson Date: Fri, 30 Sep 2016 18:51:09 -0700 Subject: [PATCH] add caldav and carddav records to DNS status checks --- management/status_checks.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/management/status_checks.py b/management/status_checks.py index 4077066a..0bcf9d9f 100755 --- a/management/status_checks.py +++ b/management/status_checks.py @@ -620,6 +620,16 @@ def check_mail_domain(domain, env, output): which may prevent recipients from receiving your mail. See http://www.spamhaus.org/dbl/ and http://www.spamhaus.org/query/domain/%s.""" % (dbl, domain)) + if domain != env["PRIMARY_HOSTNAME"]: + for dav in ("card", "cal"): + dav_domain = "_" + dav + "davs._tcp." + domain + expected = "0 0 443 " + env["PRIMARY_HOSTNAME"] + values = query_dns(dav_domain, "SRV") + if expected == values: + output.print_ok("Domain's %sdav is set properly. [%s ↦ %s]" % (dav, dav_domain, expected)) + else: + output.print_warning("This domain should set a %sdav record: %s ↦ %s" % (dav, dav_domain, expected)) + def check_web_domain(domain, rounded_time, ssl_certificates, env, output): # See if the domain's A record resolves to our PUBLIC_IP. This is already checked # for PRIMARY_HOSTNAME, for which it is required for mail specifically. For it and