mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[enh] Add dummy DMARC support if DKIM already supported. #233
This commit is contained in:
parent
d950826702
commit
4a787da440
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue