do not generate dns zonefiles for www only websites with external DNS records

This commit is contained in:
KiekerJan 2021-06-25 00:36:12 +02:00
parent eb36091d41
commit db612e91e5
1 changed files with 5 additions and 0 deletions

View File

@ -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