added functionality that DNS DMARC entry for report is only shown when needed also to zonefile

This commit is contained in:
Jumper78
2025-02-16 21:26:34 +00:00
parent fa74b19f90
commit a5d2783604

View File

@@ -81,7 +81,8 @@ 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)
if domain.dns_dmarc_report_needed:
res.append(domain.dns_dmarc_report)
res.extend(domain.dns_tlsa)
res.extend(domain.dns_autoconfig)
for alternative in domain.alternatives:
@@ -92,7 +93,8 @@ 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(alternative.dns_dmarc)
res.append(alternative.dns_dmarc_report)
if alternative.dns_dmarc_report_needed:
res.append(alternative.dns_dmarc_report)
res.append("")
return flask.Response(
"\n".join(res),