rename chatmail_domain to mail_domain like is used everywhere else

This commit is contained in:
holger krekel
2024-07-15 15:14:21 +02:00
parent ef7f4965d4
commit d3c29b2f6e
2 changed files with 15 additions and 22 deletions

View File

@@ -2,29 +2,29 @@
; Required DNS entries for chatmail servers ; Required DNS entries for chatmail servers
; ;
{% if A %} {% if A %}
{{ chatmail_domain }}. A {{ A }} {{ mail_domain }}. A {{ A }}
{% endif %} {% endif %}
{% if AAAA %} {% if AAAA %}
{{ chatmail_domain }}. AAAA {{ AAAA }} {{ mail_domain }}. AAAA {{ AAAA }}
{% endif %} {% endif %}
{{ chatmail_domain }}. MX 10 {{ chatmail_domain }}. {{ mail_domain }}. MX 10 {{ mail_domain }}.
_mta-sts.{{ chatmail_domain }}. TXT "v=STSv1; id={{ sts_id }}" _mta-sts.{{ mail_domain }}. TXT "v=STSv1; id={{ sts_id }}"
mta-sts.{{ chatmail_domain }}. CNAME {{ chatmail_domain }}. mta-sts.{{ mail_domain }}. CNAME {{ mail_domain }}.
www.{{ chatmail_domain }}. CNAME {{ chatmail_domain }}. www.{{ mail_domain }}. CNAME {{ mail_domain }}.
{{ dkim_entry }} {{ dkim_entry }}
; ;
; Recommended DNS entries for interoperability and security-hardening ; Recommended DNS entries for interoperability and security-hardening
; ;
{{ chatmail_domain }}. TXT "v=spf1 a:{{ chatmail_domain }} ~all" {{ mail_domain }}. TXT "v=spf1 a:{{ mail_domain }} ~all"
_dmarc.{{ chatmail_domain }}. TXT "v=DMARC1;p=reject;adkim=s;aspf=s" _dmarc.{{ mail_domain }}. TXT "v=DMARC1;p=reject;adkim=s;aspf=s"
{% if acme_account_url %} {% if acme_account_url %}
{{ chatmail_domain }}. CAA 128 issue "letsencrypt.org;accounturi={{ acme_account_url }}" {{ mail_domain }}. CAA 128 issue "letsencrypt.org;accounturi={{ acme_account_url }}"
{% endif %} {% endif %}
_adsp._domainkey.{{ chatmail_domain }}. TXT "dkim=discardable" _adsp._domainkey.{{ mail_domain }}. TXT "dkim=discardable"
_submission._tcp.{{ chatmail_domain }}. SRV 0 1 587 {{ chatmail_domain }}. _submission._tcp.{{ mail_domain }}. SRV 0 1 587 {{ mail_domain }}.
_submissions._tcp.{{ chatmail_domain }}. SRV 0 1 465 {{ chatmail_domain }}. _submissions._tcp.{{ mail_domain }}. SRV 0 1 465 {{ mail_domain }}.
_imap._tcp.{{ chatmail_domain }}. SRV 0 1 143 {{ chatmail_domain }}. _imap._tcp.{{ mail_domain }}. SRV 0 1 143 {{ mail_domain }}.
_imaps._tcp.{{ chatmail_domain }}. SRV 0 1 993 {{ chatmail_domain }}. _imaps._tcp.{{ mail_domain }}. SRV 0 1 993 {{ mail_domain }}.

View File

@@ -30,14 +30,7 @@ def get_filled_zone_file(remote_data):
template = importlib.resources.files(__package__).joinpath("chatmail.zone.j2") template = importlib.resources.files(__package__).joinpath("chatmail.zone.j2")
content = template.read_text() content = template.read_text()
zonefile = Template(content).render( zonefile = Template(content).render(**remote_data)
acme_account_url=remote_data["acme_account_url"],
dkim_entry=remote_data["dkim_entry"],
A=remote_data["A"],
AAAA=remote_data["AAAA"],
sts_id=sts_id,
chatmail_domain=remote_data["mail_domain"],
)
lines = [x.strip() for x in zonefile.split("\n") if x.strip()] lines = [x.strip() for x in zonefile.split("\n") if x.strip()]
lines.append("") lines.append("")
zonefile = "\n".join(lines) zonefile = "\n".join(lines)