mirror of
https://github.com/outbackdingo/Mailu.git
synced 2026-01-28 02:19:34 +00:00
extended the zonefile to also include the dns entries of the alternative domains
added the dmarc report dns entry also for the main domain
This commit is contained in:
@@ -81,8 +81,18 @@ def domain_download_zonefile(domain_name):
|
||||
txt = ' '.join(f'"{txt[p:p+250]}"' for p in range(0, len(txt), 250))
|
||||
res.append(f'{record} {txt}')
|
||||
res.append(domain.dns_dmarc)
|
||||
res.append(domain.dns_dmarc_report)
|
||||
res.extend(domain.dns_tlsa)
|
||||
res.extend(domain.dns_autoconfig)
|
||||
for alternative in domain.alternatives:
|
||||
res.extend([alternative.dns_mx, alternative.dns_spf])
|
||||
if alternative.domain.dkim_publickey:
|
||||
record = alternative.dns_dkim.split('"', 1)[0].strip()
|
||||
txt = f'v=DKIM1; k=rsa; p={alternative.domain.dkim_publickey}'
|
||||
txt = ' '.join(f'"{txt[p:p+250]}"' for p in range(0, len(txt), 250))
|
||||
res.append(f'{record} {txt}')
|
||||
res.append(alternative.dns_dmarc)
|
||||
res.append(alternative.dns_dmarc_report)
|
||||
res.append("")
|
||||
return flask.Response(
|
||||
"\n".join(res),
|
||||
|
||||
Reference in New Issue
Block a user