1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-18 18:07:22 +01:00

manage the nginx conf in the management daemon too so we can have nginx operate on all domains that we serve mail for

This commit is contained in:
Joshua Tauberer
2014-06-20 01:16:38 +00:00
parent a1a80b295e
commit 5faa1cae71
7 changed files with 133 additions and 22 deletions

View File

@@ -6,7 +6,7 @@ import os, os.path, urllib.parse, datetime, re, hashlib
import rtyaml
from mailconfig import get_mail_domains
from utils import shell, load_env_vars_from_file
from utils import shell, load_env_vars_from_file, safe_domain_name
def get_dns_domains(env):
# What domains should we serve DNS for?
@@ -30,7 +30,7 @@ def get_dns_domains(env):
# Make a nice and safe filename for each domain.
zonefiles = []
for domain in domains:
zonefiles.append([domain, urllib.parse.quote(domain, safe='') + ".txt"])
zonefiles.append([domain, safe_domain_name(domain) + ".txt"])
return zonefiles