2022-03-30 12:54:38 +02:00
|
|
|
<div role="tabpanel" class="tab-pane fade" id="tab-config-dkim" role="tabpanel" aria-labelledby="tab-config-dkim">
|
2022-06-06 20:38:24 +02:00
|
|
|
<div class="card mb-4">
|
2022-10-11 11:41:06 +02:00
|
|
|
<div class="card-header d-flex fs-5">
|
2022-06-06 20:38:24 +02:00
|
|
|
<button class="btn d-md-none flex-grow-1 text-start" data-bs-target="#collapse-tab-config-dkim" data-bs-toggle="collapse" aria-controls="ollapse-tab-config-dkim">
|
|
|
|
{{ lang.admin.dkim_keys }}
|
|
|
|
</button>
|
|
|
|
<span class="d-none d-md-block">{{ lang.admin.dkim_keys }}</span>
|
|
|
|
</div>
|
|
|
|
<div id="collapse-tab-config-dkim" class="card-body collapse" data-bs-parent="#admin-content">
|
2022-07-08 11:32:46 +02:00
|
|
|
<div class="btn-group my-4" role="group">
|
|
|
|
<input type="checkbox" id="check-dkim_key_valid" class="btn-check" autocomplete="off" data-bs-toggle="collapse" data-bs-target=".dkim_key_valid" checked>
|
|
|
|
<label class="btn btn-outline-secondary btn-check-label" for="check-dkim_key_valid">{{ lang.admin.dkim_key_valid }}</label>
|
|
|
|
|
|
|
|
<input type="checkbox" id="check-dkim_key_unused" class="btn-check" autocomplete="off" data-bs-toggle="collapse" data-bs-target=".dkim_key_unused" checked>
|
|
|
|
<label class="btn btn-outline-secondary btn-check-label" for="check-dkim_key_unused">{{ lang.admin.dkim_key_unused }}</label>
|
|
|
|
|
|
|
|
<input type="checkbox" id="check-dkim_key_missing" class="btn-check" autocomplete="off" data-bs-toggle="collapse" data-bs-target=".dkim_key_missing" checked>
|
|
|
|
<label class="btn btn-outline-secondary btn-check-label" for="check-dkim_key_missing">{{ lang.admin.dkim_key_missing }}</label>
|
2021-09-22 20:47:10 +02:00
|
|
|
</div>
|
|
|
|
{% for domain, domain_data in dkim_domains %}
|
|
|
|
{% if domain_data.dkim %}
|
2022-04-13 16:37:52 +02:00
|
|
|
<div class="row collapse show dkim_key_valid">
|
2021-09-22 20:47:10 +02:00
|
|
|
<div class="col-md-1"><input type="checkbox" data-id="dkim" name="multi_select" value="{{ domain }}"></div>
|
|
|
|
<div class="col-md-3">
|
|
|
|
<p>{{ lang.admin.domain }}: <strong>{{ domain }}</strong>
|
2022-04-13 16:37:52 +02:00
|
|
|
<p class="dkim-label"><span class="badge fs-6 bg-success">{{ lang.admin.dkim_key_valid }}</span></p>
|
|
|
|
<p class="dkim-label"><span class="badge fs-6 bg-primary">{{ lang.admin.dkim_domains_selector }} '{{ domain_data.dkim.dkim_selector }}'</span></p>
|
|
|
|
<p class="dkim-label"><span class="badge fs-6 bg-info">{{ domain_data.dkim.length }} bit</span></p>
|
2021-09-22 20:47:10 +02:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-8">
|
2022-04-13 16:37:52 +02:00
|
|
|
<textarea class="form-control" rows="6" readonly>{{ domain_data.dkim.dkim_txt }}</textarea>
|
|
|
|
<small>
|
|
|
|
<i class="bi bi-arrow-return-right"></i>
|
|
|
|
<a href="#" data-bs-toggle="modal" data-bs-target="#showDKIMprivKey" id="dkim_priv" data-priv-key="{{ domain_data.dkim.privkey }}"> {{ lang.admin.dkim_private_key }}</a>
|
|
|
|
</small>
|
2021-09-22 20:47:10 +02:00
|
|
|
</div>
|
2022-04-01 08:02:11 +02:00
|
|
|
<hr class="d-block d-md-none">
|
2021-09-22 20:47:10 +02:00
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<div class="row collapse in dkim_key_missing">
|
|
|
|
<div class="col-md-1"><input class="dkim_missing" type="checkbox" data-id="dkim" name="multi_select" value="{{ domain }}" disabled></div>
|
|
|
|
<div class="col-md-3">
|
2022-04-13 16:37:52 +02:00
|
|
|
<p>{{ lang.admin.domain }}: <strong>{{ domain }}</strong><br><span class="badge fs-6 bg-danger">{{ lang.admin.dkim_key_missing }}</span></p>
|
2021-09-22 20:47:10 +02:00
|
|
|
</div>
|
|
|
|
<div class="col-md-8"><pre>-</pre></div>
|
2022-04-01 08:02:11 +02:00
|
|
|
<hr class="d-block d-md-none">
|
2021-09-22 20:47:10 +02:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% for alias_domain, alias_domain_data in domain_data.alias_domains %}
|
|
|
|
{% if alias_domain_data.dkim %}
|
|
|
|
<div class="row collapse in dkim_key_valid">
|
|
|
|
<div class="col-md-1"><input type="checkbox" data-id="dkim" name="multi_select" value="{{ alias_domain }}"></div>
|
2022-04-01 07:33:01 +02:00
|
|
|
<div class="col-md-2 offset-md-1">
|
2021-09-22 20:47:10 +02:00
|
|
|
<p><small>↳ Alias-Domain: <strong>{{ alias_domain }}</strong></small>
|
2022-04-13 16:37:52 +02:00
|
|
|
<p class="dkim-label"><span class="badge fs-6 bg-success">{{ lang.admin.dkim_key_valid }}</span></p>
|
|
|
|
<p class="dkim-label"><span class="badge fs-6 bg-primary">Selector '{{ alias_domain_data.dkim.dkim_selector }}'</span></p>
|
|
|
|
<p class="dkim-label"><span class="badge fs-6 bg-info">{{ alias_domain_data.dkim.length }} bit</span></p>
|
2021-09-22 20:47:10 +02:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-8">
|
|
|
|
<pre>{{ alias_domain_data.dkim.dkim_txt }}</pre>
|
2022-03-30 13:04:54 +02:00
|
|
|
<p data-bs-toggle="modal" data-bs-target="#showDKIMprivKey" id="dkim_priv" style="cursor:pointer;margin-top:-8pt" data-priv-key="{{ alias_domain_data.dkim.privkey }}"><small><i class="bi bi-arrow-return-right"></i> Private key</small></p>
|
2021-09-22 20:47:10 +02:00
|
|
|
</div>
|
2022-04-01 08:02:11 +02:00
|
|
|
<hr class="d-block d-md-none">
|
2021-09-22 20:47:10 +02:00
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<div class="row collapse in dkim_key_missing">
|
|
|
|
<div class="col-md-1"><input class="dkim_missing" type="checkbox" data-id="dkim" name="multi_select" value="{{ alias_domain }}" disabled></div>
|
2022-04-01 07:33:01 +02:00
|
|
|
<div class="col-md-2 offset-md-1">
|
2022-04-13 16:37:52 +02:00
|
|
|
<p><small>↳ Alias-Domain: <strong>{{ alias_domain }}</strong><br></small><span class="badge fs-6 bg-danger">{{ lang.admin.dkim_key_missing }}</span></p>
|
2021-09-22 20:47:10 +02:00
|
|
|
</div>
|
|
|
|
<div class="col-md-8"><pre>-</pre></div>
|
2022-04-01 08:02:11 +02:00
|
|
|
<hr class="d-block d-md-none">
|
2021-09-22 20:47:10 +02:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% endfor %}
|
|
|
|
{% for blind, data in dkim_blind_domains|filter(data => data.dkim is not null) %}
|
|
|
|
<div class="row collapse in dkim_key_unused">
|
|
|
|
<div class="col-md-1"><input type="checkbox" data-id="dkim" name="multi_select" value="{{ blind }}"></div>
|
|
|
|
<div class="col-md-3">
|
|
|
|
<p>{{ lang.admin.domain }}: <strong>{{ blind }}</strong>
|
2022-04-13 16:37:52 +02:00
|
|
|
<p class="dkim-label"><span class="badge fs-6 bg-warning">{{ lang.admin.dkim_key_unused }}</span></p>
|
|
|
|
<p class="dkim-label"><span class="badge fs-6 bg-primary">Selector '{{ data.dkim.dkim_selector }}'</span></p>
|
|
|
|
<p class="dkim-label"><span class="badge fs-6 bg-info">{{ data.dkim.length }} bit</span></p>
|
2021-09-22 20:47:10 +02:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-8">
|
|
|
|
<pre>{{ data.dkim.dkim_txt }}</pre>
|
2022-03-30 13:04:54 +02:00
|
|
|
<p data-bs-toggle="modal" data-bs-target="#showDKIMprivKey" id="dkim_priv" style="cursor:pointer;margin-top:-8pt" data-priv-key="{{ data.dkim.privkey }}"><small><i class="bi bi-arrow-return-right"></i> Private key</small></p>
|
2021-09-22 20:47:10 +02:00
|
|
|
</div>
|
2022-04-01 08:02:11 +02:00
|
|
|
<hr class="d-block d-md-none">
|
2021-09-22 20:47:10 +02:00
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
<div class="mass-actions-admin">
|
|
|
|
<div class="btn-group btn-group-sm">
|
2022-03-31 15:24:10 +02:00
|
|
|
<button type="button" id="toggle_multi_select_all" data-id="dkim" class="btn btn-sm btn-xs-half d-block d-sm-inline btn-secondary"><i class="bi bi-check-all"></i> {{ lang.mailbox.toggle_all }}</button>
|
|
|
|
<button type="button" data-action="delete_selected" name="delete_selected" data-id="dkim" data-api-url="delete/dkim" class="btn btn-sm btn-xs-half d-block d-sm-inline btn-danger"><i class="bi bi-trash"></i> {{ lang.admin.remove }}</button>
|
2021-09-22 20:47:10 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-03-31 12:57:33 +02:00
|
|
|
<legend style="margin-top:40px">{{ lang.admin.dkim_add_key }}</legend><hr />
|
2021-09-22 20:47:10 +02:00
|
|
|
<form class="form" data-id="dkim" role="form" method="post">
|
2022-04-13 16:37:52 +02:00
|
|
|
<div class="mb-4">
|
2021-09-22 20:47:10 +02:00
|
|
|
<label for="dkim_add_domains">{{ lang.admin.domain_s }}</label>
|
|
|
|
<input class="form-control input-sm" id="dkim_add_domains" name="domains" placeholder="example.org, example.com" required>
|
|
|
|
<small><i class="bi bi-arrow-return-right"></i> <a href="#" id="dkim_missing_keys">{{ lang.admin.dkim_domains_wo_keys }}</a></small>
|
|
|
|
</div>
|
2022-04-13 16:37:52 +02:00
|
|
|
<div class="mb-2">
|
2021-09-22 20:47:10 +02:00
|
|
|
<label for="dkim_selector">{{ lang.admin.dkim_domains_selector }}</label>
|
|
|
|
<input class="form-control input-sm" id="dkim_selector" name="dkim_selector" value="dkim" required>
|
|
|
|
</div>
|
2022-04-13 16:37:52 +02:00
|
|
|
<div class="row mb-4">
|
|
|
|
<div class="col-12 col-md-6 col-lg-4 col-xl-3">
|
|
|
|
<select data-style="btn btn-secondary btn-sm" class="form-control" id="key_size" name="key_size" title="{{ lang.admin.dkim_key_length }}" required>
|
|
|
|
<option data-subtext="bits">1024</option>
|
|
|
|
<option data-subtext="bits">2048</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
2021-09-22 20:47:10 +02:00
|
|
|
</div>
|
2022-03-31 15:24:10 +02:00
|
|
|
<button class="btn btn-sm d-block d-sm-inline btn-success" data-action="add_item" data-id="dkim" data-api-url='add/dkim' data-api-attr='{}' href="#"><i class="bi bi-plus-lg"></i> {{ lang.admin.add }}</button>
|
2021-09-22 20:47:10 +02:00
|
|
|
</form>
|
|
|
|
|
2022-03-30 13:04:54 +02:00
|
|
|
<legend data-bs-target="#import_dkim" style="margin-top:40px;cursor:pointer" unselectable="on" data-bs-toggle="collapse">
|
2021-09-22 20:47:10 +02:00
|
|
|
<i style="font-size:10pt;" class="bi bi-plus-square"></i> {{ lang.admin.import_private_key }}
|
|
|
|
</legend>
|
2022-03-31 12:57:33 +02:00
|
|
|
<hr />
|
2021-09-22 20:47:10 +02:00
|
|
|
<div id="import_dkim" class="collapse">
|
|
|
|
<form class="form" data-id="dkim_import" role="form" method="post">
|
2022-04-13 16:37:52 +02:00
|
|
|
<div class="mb-2">
|
2021-09-22 20:47:10 +02:00
|
|
|
<label for="dkim_import_domain">{{ lang.admin.domain }}:</label>
|
|
|
|
<input class="form-control input-sm" id="dkim_import_domain" name="domain" placeholder="example.org" required>
|
|
|
|
</div>
|
2022-04-13 16:37:52 +02:00
|
|
|
<div class="mb-2">
|
2021-09-22 20:47:10 +02:00
|
|
|
<label for="dkim_import_selector">{{ lang.admin.dkim_domains_selector }}:</label>
|
|
|
|
<input class="form-control input-sm" id="dkim_import_selector" name="dkim_selector" value="dkim" required>
|
|
|
|
</div>
|
2022-04-13 16:37:52 +02:00
|
|
|
<div class="mb-4">
|
2021-09-22 20:47:10 +02:00
|
|
|
<label for="private_key_file">{{ lang.admin.private_key }}: (RSA PKCS#8)</label>
|
|
|
|
<textarea class="form-control input-sm" rows="10" name="private_key_file" id="private_key_file" required placeholder="-----BEGIN RSA KEY-----"></textarea>
|
|
|
|
</div>
|
2022-04-13 16:37:52 +02:00
|
|
|
<div class="mb-2">
|
2021-09-22 20:47:10 +02:00
|
|
|
<label>
|
|
|
|
<input type="checkbox" name="overwrite_existing" value="1"> {{ lang.admin.dkim_overwrite_key }}
|
|
|
|
</label>
|
|
|
|
</div>
|
2022-03-31 15:24:10 +02:00
|
|
|
<button class="btn btn-sm d-block d-sm-inline btn-secondary" data-action="add_item" data-id="dkim_import" data-api-url='add/dkim_import' data-api-attr='{}' href="#"><i class="bi bi-plus-lg"></i> {{ lang.admin.import }}</button>
|
2021-09-22 20:47:10 +02:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
2022-03-30 13:04:54 +02:00
|
|
|
<legend data-bs-target="#duplicate_dkim" style="margin-top:40px;cursor:pointer" unselectable="on" data-bs-toggle="collapse">
|
2021-09-22 20:47:10 +02:00
|
|
|
<i style="font-size:10pt;" class="bi bi-plus-square"></i> {{ lang.admin.duplicate_dkim }}
|
|
|
|
</legend>
|
2022-03-31 12:57:33 +02:00
|
|
|
<hr />
|
2021-09-22 20:47:10 +02:00
|
|
|
<div id="duplicate_dkim" class="collapse">
|
|
|
|
<form class="form-horizontal" data-id="dkim_duplicate" role="form" method="post">
|
2022-04-13 16:37:52 +02:00
|
|
|
<div class="row mb-2">
|
|
|
|
<label class="control-label col-sm-2 text-sm-end" for="from_domain">{{ lang.admin.dkim_from }}:</label>
|
|
|
|
<div class="col-sm-10 col-md-6 col-lg-4 col-xl-3">
|
2022-03-31 12:41:50 +02:00
|
|
|
<select data-style="btn btn-secondary btn-sm"
|
2021-09-22 20:47:10 +02:00
|
|
|
data-live-search="true"
|
|
|
|
data-id="dkim_duplicate"
|
|
|
|
title="{{ lang.admin.dkim_from_title }}"
|
|
|
|
name="from_domain" id="from_domain" class="full-width-select form-control" required>
|
|
|
|
{% for dkim_domain in dkim_domains_with_keys %}
|
|
|
|
<option value="{{ dkim_domain }}">{{ dkim_domain }}</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-04-13 16:37:52 +02:00
|
|
|
<div class="row mb-4">
|
|
|
|
<label class="control-label col-sm-2 text-sm-end" for="to_domain">{{ lang.admin.dkim_to }}:</label>
|
|
|
|
<div class="col-sm-10 col-md-6 col-lg-4 col-xl-3">
|
2021-09-22 20:47:10 +02:00
|
|
|
<select
|
|
|
|
data-live-search="true"
|
2022-03-31 12:41:50 +02:00
|
|
|
data-style="btn btn-secondary btn-sm"
|
2021-09-22 20:47:10 +02:00
|
|
|
data-id="dkim_duplicate"
|
|
|
|
title="{{ lang.admin.dkim_to_title }}"
|
|
|
|
name="to_domain" id="to_domain" class="full-width-select form-control" multiple required>
|
|
|
|
{% for domain in all_domains %}
|
|
|
|
<option value="{{ domain }}">{{ domain }}</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-31 15:24:10 +02:00
|
|
|
<button class="btn btn-sm d-block d-sm-inline btn-secondary" data-action="add_item" data-id="dkim_duplicate" data-api-url='add/dkim_duplicate' data-api-attr='{}' href="#"><i class="bi bi-clipboard-plus"></i> {{ lang.admin.duplicate }}</button>
|
2021-09-22 20:47:10 +02:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|