1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-16 17:47:23 +01:00

dont serve web for domains with custom DNS records that point A/AAAA elsewhere, and in whats_next only check that an A record exists on a domain if we are serving web on the domain

This commit is contained in:
Joshua Tauberer
2014-07-20 15:15:33 +00:00
parent 8354d9732a
commit 8042ab66ac
3 changed files with 45 additions and 26 deletions

View File

@@ -48,6 +48,11 @@ def get_dns_zones(env):
return zonefiles
def get_custom_dns_config(env):
try:
return rtyaml.load(open(os.path.join(env['STORAGE_ROOT'], 'dns/custom.yaml')))
except:
return { }
def do_dns_update(env):
# What domains (and their zone filenames) should we build?
@@ -55,10 +60,7 @@ def do_dns_update(env):
zonefiles = get_dns_zones(env)
# Custom records to add to zones.
try:
additional_records = rtyaml.load(open(os.path.join(env['STORAGE_ROOT'], 'dns/custom.yaml')))
except:
additional_records = { }
additional_records = get_custom_dns_config(env)
# Write zone files.
os.makedirs('/etc/nsd/zones', exist_ok=True)