<commit_before>{% extends "base.html" %}

{% block title %}
{% trans %}Domain details{% endtrans %}
{% endblock %}

{% block subtitle %}
{{ domain.name }}
{% endblock %}

{% block main_action %}
{% if current_user.global_admin %}
<a class="btn btn-primary" href="{{ url_for(".domain_genkeys", domain_name=domain.name) }}">{% trans %}Regenerate keys{% endtrans %}</a>
{% endif %}
{% endblock %}

{% block box %}
<table class="table table-bordered">
  <tbody>
    <tr>
      <th>{% trans %}Domain name{% endtrans %}</th>
      <td>{{ domain.name }}</td>
    </tr>
    <tr>
      <th>{% trans %}DNS MX entry{% endtrans %}</th>
      <td><pre>{{ domain.name }}. 600 IN MX 10 {{ config["HOSTNAME"] }}.</pre></td>
    </tr>
    <tr>
      <th>{% trans %}DNS SPF entries{% endtrans %}</th>
      <td><pre>
{{ domain.name }}. 600 IN TXT "v=spf1 mx a:{{ config["HOSTNAME"] }} -all"
{{ domain.name }}. 600 IN SPF "v=spf1 mx a:{{ config["HOSTNAME"] }} -all"</pre></td>
    </tr>
    {% if domain.dkim_publickey %}
    <tr>
      <th>{% trans %}DKIM public key{% endtrans %}</th>
      <td><pre style="white-space: pre-wrap; word-wrap: break-word;">{{ domain.dkim_publickey }}</pre></td>
    </tr>
    <tr>
      <th>{% trans %}DNS DKIM entry{% endtrans %}</th>
      <td><pre style="white-space: pre-wrap; word-wrap: break-word;">{{ config["DKIM_SELECTOR"] }}._domainkey.{{ domain.name }}. IN 600 TXT "v=DKIM1; k=rsa; p={{ domain.dkim_publickey }}"</pre></td>
    </tr>
    <tr>
      <th>{% trans %}DNS DMARC entry{% endtrans %}</th>
      {% if config["DMARC_RUA"] != "" and config["DMARC_RUF"] != "" %}
      <td><pre>_dmarc.{{ domain.name }}. 600 IN TXT "v=DMARC1; p=reject; rua=mailto:{{ config["DMARC_RUA"] }}@{{ config["DOMAIN"] }}; ruf=mailto:{{ config["DMARC_RUF"] }}@{{ config["DOMAIN"] }}; adkim=s; aspf=s"</pre></td>
      {% elif config["DMARC_RUA"] != "" %}
      <td><pre>_dmarc.{{ domain.name }}. 600 IN TXT "v=DMARC1; p=reject; rua=mailto:{{ config["DMARC_RUA"] }}@{{ config["DOMAIN"] }}; adkim=s; aspf=s"</pre></td>
      {% elif config["DMARC_RUF"] != "" %}
      <td><pre>_dmarc.{{ domain.name }}. 600 IN TXT "v=DMARC1; p=reject; ruf=mailto:{{ config["DMARC_RUF"] }}@{{ config["DOMAIN"] }}; adkim=s; aspf=s"</pre></td>
      {% else %}
      <td><pre>_dmarc.{{ domain.name }}. 600 IN TXT "v=DMARC1; p=reject; rua=mailto:{{ config["POSTMASTER"] }}@{{ config["DOMAIN"] }}; adkim=s; aspf=s"</pre></td>
      {% endif %}
    </tr>
    {% endif %}
  </tbody>
</table>
{% endblock %}
<commit_msg>Simplify the details page for RUA/RUF<commit_after>{% extends "base.html" %}

{% block title %}
{% trans %}Domain details{% endtrans %}
{% endblock %}

{% block subtitle %}
{{ domain.name }}
{% endblock %}

{% block main_action %}
{% if current_user.global_admin %}
<a class="btn btn-primary" href="{{ url_for(".domain_genkeys", domain_name=domain.name) }}">{% trans %}Regenerate keys{% endtrans %}</a>
{% endif %}
{% endblock %}

{% block box %}
<table class="table table-bordered">
  <tbody>
    <tr>
      <th>{% trans %}Domain name{% endtrans %}</th>
      <td>{{ domain.name }}</td>
    </tr>
    <tr>
      <th>{% trans %}DNS MX entry{% endtrans %}</th>
      <td><pre>{{ domain.name }}. 600 IN MX 10 {{ config["HOSTNAME"] }}.</pre></td>
    </tr>
    <tr>
      <th>{% trans %}DNS SPF entries{% endtrans %}</th>
      <td><pre>
{{ domain.name }}. 600 IN TXT "v=spf1 mx a:{{ config["HOSTNAME"] }} -all"
{{ domain.name }}. 600 IN SPF "v=spf1 mx a:{{ config["HOSTNAME"] }} -all"</pre></td>
    </tr>
    {% if domain.dkim_publickey %}
    <tr>
      <th>{% trans %}DKIM public key{% endtrans %}</th>
      <td><pre style="white-space: pre-wrap; word-wrap: break-word;">{{ domain.dkim_publickey }}</pre></td>
    </tr>
    <tr>
      <th>{% trans %}DNS DKIM entry{% endtrans %}</th>
      <td><pre style="white-space: pre-wrap; word-wrap: break-word;">{{ config["DKIM_SELECTOR"] }}._domainkey.{{ domain.name }}. IN 600 TXT "v=DKIM1; k=rsa; p={{ domain.dkim_publickey }}"</pre></td>
    </tr>
    <tr>
      <th>{% trans %}DNS DMARC entry{% endtrans %}</th>
      <td><pre>_dmarc.{{ domain.name }}. 600 IN TXT "v=DMARC1; p=reject;{% if config["DMARC_RUA"] %} rua=mailto:{{ config["DMARC_RUA"] }}@{{ config["DOMAIN"] }};{% endif %}{% if config["DMARC_RUF"] %} ruf=mailto:{{ config["DMARC_RUF"] }}@{{ config["DOMAIN"] }};{% endif %} adkim=s; aspf=s"</pre></td>
    </tr>
    {% endif %}
  </tbody>
</table>
{% endblock %}

{'fraction_non_alphanumeric': 0.252657769735354, 'fraction_numerical': 0.01221443112418005, 'mean_word_length': 3.5919003115264796, 'pattern_counts': {'":': 0, '<': 119, '<?xml version=': 0, '>': 119, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6194201', 'n_tokens_mistral': 1888, 'n_tokens_neox': 1677, 'n_words': 385}