diff --git a/management/dns_update.py b/management/dns_update.py index 3578fcc2..a1fd6b33 100755 --- a/management/dns_update.py +++ b/management/dns_update.py @@ -281,10 +281,9 @@ def build_zone(domain, all_domains, additional_records, www_redirect_domains, en if not has_rec(dmarc_qname, "TXT", prefix="v=DMARC1; "): records.append((dmarc_qname, "TXT", 'v=DMARC1; p=reject', "Recommended. Prevents use of this domain name for outbound mail by specifying that the SPF rule should be honoured for mail from @%s." % (qname + "." + domain))) - if environ.get('DISABLE_NEXTCLOUD') != '0': + if environ.get('DISABLE_NEXTCLOUD') != '0' and domain != env["PRIMARY_HOSTNAME"]: # Add CardDAV/CalDAV SRV records on the non-primary hostname that points to the primary hostname. # The SRV record format is priority (0, whatever), weight (0, whatever), port, service provider hostname (w/ trailing dot). - if domain != env["PRIMARY_HOSTNAME"]: for dav in ("card", "cal"): qname = "_" + dav + "davs._tcp" if not has_rec(qname, "SRV"):