[enh] Add dummy DMARC support if DKIM already supported. #233

This commit is contained in:
opi 2016-03-04 11:21:37 +01:00
parent d950826702
commit 4a787da440

View file

@ -270,6 +270,7 @@ def domain_dns_conf(domain, ttl=None):
result += ' ip6:{ip6}'.format(ip6=ip6)
result += ' -all"'
# DKIM
try:
with open('/etc/dkim/{domain}.mail.txt'.format(domain=domain)) as f:
dkim_content = f.read()
@ -288,4 +289,9 @@ def domain_dns_conf(domain, ttl=None):
v=dkim.group('v'), k=dkim.group('k'), p=dkim.group('p')
)
# If DKIM is set, add dummy DMARC support
result += '\n_dmarc {ttl} IN TXT "v=DMARC1; p=none"'.format(
ttl=ttl
)
return result