mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Append domain name to DKIM DNS record
This commit is contained in:
parent
8d520762e6
commit
04c31638c6
1 changed files with 3 additions and 3 deletions
|
@ -262,14 +262,14 @@ def domain_dns_conf(domain, ttl=None):
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
dkim = re.match((
|
dkim = re.match((
|
||||||
r'^(?P<domain>[a-z_\-\.]+)[\s]+([0-9]+[\s]+)?IN[\s]+TXT[\s]+[^"]*'
|
r'^(?P<host>[a-z_\-\.]+)[\s]+([0-9]+[\s]+)?IN[\s]+TXT[\s]+[^"]*'
|
||||||
'(?=.*(;[\s]*|")v=(?P<v>[^";]+))'
|
'(?=.*(;[\s]*|")v=(?P<v>[^";]+))'
|
||||||
'(?=.*(;[\s]*|")k=(?P<k>[^";]+))'
|
'(?=.*(;[\s]*|")k=(?P<k>[^";]+))'
|
||||||
'(?=.*(;[\s]*|")p=(?P<p>[^";]+))'), dkim_content, re.M|re.S
|
'(?=.*(;[\s]*|")p=(?P<p>[^";]+))'), dkim_content, re.M|re.S
|
||||||
)
|
)
|
||||||
if dkim:
|
if dkim:
|
||||||
result += '{domain} {ttl} IN TXT "v={v}; k={k}; p={p}"'.format(
|
result += '{host} {ttl} IN TXT "v={v}; k={k}; p={p}"'.format(
|
||||||
domain=dkim.group('domain'), ttl=ttl,
|
host='{0}.{1}'.format(dkim.group('host'), domain), ttl=ttl,
|
||||||
v=dkim.group('v'), k=dkim.group('k'), p=dkim.group('p')
|
v=dkim.group('v'), k=dkim.group('k'), p=dkim.group('p')
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue