diff --git a/src/yunohost/domain.py b/src/yunohost/domain.py index a17efcbcd..9244e35f9 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