Commit 2468a959 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Generate zone files for domains with only mailhost in them

parent c3f7a419
...@@ -232,6 +232,12 @@ def generate_forward(tree, hosts): ...@@ -232,6 +232,12 @@ def generate_forward(tree, hosts):
for c in tree._subnet_._cname_: for c in tree._subnet_._cname_:
result[c.domain[1]].add_host(c.alias[0], c.ttl[0], 'CNAME', c.name[0]) result[c.domain[1]].add_host(c.alias[0], c.ttl[0], 'CNAME', c.name[0])
pass pass
# Add mx hosts
for m in tree._host_._interface_._mailhost_:
# Force generation of domain file even if only mailhost present
result[m.domain[0]]
pass
# Add numbered hosts # Add numbered hosts
def add_host(domain, name, ttl, address): def add_host(domain, name, ttl, address):
if address.version == 4: if address.version == 4:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment