From 4a787da4402ceeac85ca72f7c20ed38328228f6c Mon Sep 17 00:00:00 2001 From: opi Date: Fri, 4 Mar 2016 11:21:37 +0100 Subject: [PATCH] [enh] Add dummy DMARC support if DKIM already supported. #233 --- src/yunohost/domain.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/yunohost/domain.py b/src/yunohost/domain.py index a17efcbc..9244e35f 100644 --- a/src/yunohost/domain.py +++ b/src/yunohost/domain.py @@ -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