From db612e91e5a7d1c5d5c41c3cf7fc18cc6d9ff69a Mon Sep 17 00:00:00 2001 From: KiekerJan Date: Fri, 25 Jun 2021 00:36:12 +0200 Subject: [PATCH] do not generate dns zonefiles for www only websites with external DNS records --- management/dns_update.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/management/dns_update.py b/management/dns_update.py index 55c3d805..cd1f270b 100755 --- a/management/dns_update.py +++ b/management/dns_update.py @@ -24,9 +24,14 @@ def get_dns_domains(env): # lead to infinite recursion here) and ensure PRIMARY_HOSTNAME is in the list. from mailconfig import get_mail_domains from web_update import get_web_domains + from wwwconfig import get_www_domains + domains = set() domains |= set(get_mail_domains(env)) domains |= set(get_web_domains(env, include_www_redirects=False)) + # www_domains are hosted here, but DNS is pointed to our box from somewhere else. + # DNS is thus not hosted by us for these domains. + domains -= set(get_www_domains(set())) domains.add(env['PRIMARY_HOSTNAME']) return domains