2020-02-23 08:08:55 +01:00
|
|
|
{% extends 'default.html' %}
|
|
|
|
|
|
|
|
{% set active_page = "mailbox" %}
|
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
Mailbox {{ mailbox.email }}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block default_content %}
|
|
|
|
|
2020-04-28 20:25:40 +02:00
|
|
|
<div class="row">
|
|
|
|
<div class="col">
|
|
|
|
<h1 class="h3">{{ mailbox.email }}
|
|
|
|
{% if mailbox.verified %}
|
|
|
|
<span class="cursor" data-toggle="tooltip" data-original-title="Mailbox Verified">✅</span>
|
|
|
|
{% else %}
|
|
|
|
<span class="cursor" data-toggle="tooltip" data-original-title="Mailbox Not Verified">
|
2020-02-23 08:08:55 +01:00
|
|
|
🚫
|
|
|
|
</span>
|
2020-04-28 20:25:40 +02:00
|
|
|
{% endif %}
|
|
|
|
{% if mailbox.pgp_finger_print %}
|
|
|
|
<span class="cursor" data-toggle="tooltip" data-original-title="PGP Enabled">🗝</span>
|
|
|
|
{% endif %}
|
|
|
|
</h1>
|
|
|
|
|
|
|
|
{% if not mailbox.verified %}
|
|
|
|
<div class="alert alert-info">
|
|
|
|
Mailbox not verified, please check your inbox/spam folder for the verification email.
|
|
|
|
<br>
|
|
|
|
To receive the verification email again, you can delete and re-add the mailbox.
|
|
|
|
</div>
|
2020-02-23 08:08:55 +01:00
|
|
|
{% endif %}
|
2020-03-09 09:09:22 +01:00
|
|
|
|
2020-04-28 20:25:40 +02:00
|
|
|
<!-- Change email -->
|
|
|
|
<div class="card">
|
|
|
|
<form method="post" enctype="multipart/form-data">
|
|
|
|
<input type="hidden" name="form-name" value="update-email">
|
|
|
|
{{ change_email_form.csrf_token }}
|
2020-02-23 08:08:55 +01:00
|
|
|
|
2020-04-28 20:25:40 +02:00
|
|
|
<div class="card-body">
|
|
|
|
<div class="card-title">
|
|
|
|
Change Mailbox Address
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-label">Address</label>
|
|
|
|
|
|
|
|
<!-- Not allow user to change mailbox if there's a pending change -->
|
|
|
|
{{ change_email_form.email(class="form-control", value=mailbox.email, readonly=pending_email != None) }}
|
|
|
|
{{ render_field_errors(change_email_form.email) }}
|
|
|
|
|
|
|
|
{% if pending_email %}
|
|
|
|
<div class="mt-2">
|
|
|
|
<span class="text-danger">Pending change: {{ pending_email }}</span>
|
|
|
|
<a href="{{ url_for('dashboard.cancel_mailbox_change_route', mailbox_id=mailbox.id) }}"
|
|
|
|
class="btn btn-secondary btn-sm">
|
|
|
|
Cancel mailbox change
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<button class="btn btn-primary">Change</button>
|
2020-02-23 08:08:55 +01:00
|
|
|
</div>
|
2020-04-28 20:25:40 +02:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<!-- END Change email -->
|
2020-02-23 08:08:55 +01:00
|
|
|
|
2020-05-09 17:34:59 +02:00
|
|
|
|
2020-05-07 13:28:04 +02:00
|
|
|
{% if spf_available %}
|
2020-05-09 17:34:59 +02:00
|
|
|
<!--
|
2020-05-07 13:28:04 +02:00
|
|
|
<div class="card">
|
|
|
|
<form method="post">
|
|
|
|
<input type="hidden" name="form-name" value="force-spf">
|
|
|
|
|
|
|
|
<div class="card-body">
|
|
|
|
<div class="card-title">
|
|
|
|
Enforce SPF
|
|
|
|
<div class="small-text">
|
|
|
|
Block emails to reverse alias if sender is not validated by SPF,
|
|
|
|
even when SPF is configured as soft-fail.
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<label class="custom-switch cursor mt-2 pl-0"
|
|
|
|
data-toggle="tooltip"
|
|
|
|
{% if mailbox.force_spf %}
|
|
|
|
title="Disable SPF enforcement"
|
|
|
|
{% else %}
|
|
|
|
title="Enable SPF enforcement"
|
|
|
|
{% endif %}
|
|
|
|
>
|
|
|
|
<input type="checkbox" name="spf-status" class="custom-switch-input"
|
|
|
|
{{ "checked" if mailbox.force_spf else "" }}>
|
|
|
|
<span class="custom-switch-indicator"></span>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
2020-05-09 17:34:59 +02:00
|
|
|
-->
|
2020-05-07 13:28:04 +02:00
|
|
|
{% endif %}
|
2020-03-08 12:30:48 +01:00
|
|
|
|
2020-04-28 20:25:40 +02:00
|
|
|
<div class="card">
|
|
|
|
<form method="post">
|
|
|
|
<input type="hidden" name="form-name" value="pgp">
|
2020-03-08 12:30:48 +01:00
|
|
|
|
2020-04-28 20:25:40 +02:00
|
|
|
<div class="card-body">
|
|
|
|
<div class="card-title">
|
|
|
|
Pretty Good Privacy (PGP)
|
|
|
|
<div class="small-text">
|
|
|
|
By importing your PGP Public Key into SimpleLogin, all emails sent to {{ mailbox.email }} are
|
|
|
|
<b>encrypted</b> with your key.
|
|
|
|
</div>
|
2020-03-08 22:59:46 +01:00
|
|
|
</div>
|
|
|
|
|
2020-04-28 20:25:40 +02:00
|
|
|
{% if not current_user.is_premium() %}
|
|
|
|
<div class="alert alert-danger" role="alert">
|
|
|
|
This feature is only available in premium plan.
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2020-03-19 19:15:42 +01:00
|
|
|
|
2020-04-28 20:25:40 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-label">PGP Public Key</label>
|
2020-03-08 12:30:48 +01:00
|
|
|
|
2020-04-28 20:25:40 +02:00
|
|
|
<textarea name="pgp"
|
|
|
|
{% if not current_user.is_premium() %} disabled {% endif %}
|
|
|
|
class="form-control" rows=10
|
|
|
|
placeholder="-----BEGIN PGP PUBLIC KEY BLOCK-----">{{ mailbox.pgp_public_key or "" }}</textarea>
|
|
|
|
</div>
|
2020-03-08 12:30:48 +01:00
|
|
|
|
2020-04-28 20:25:40 +02:00
|
|
|
<button class="btn btn-primary" name="action"
|
|
|
|
{% if not current_user.is_premium() %} disabled {% endif %}
|
|
|
|
value="save">Save
|
|
|
|
</button>
|
|
|
|
{% if mailbox.pgp_finger_print %}
|
|
|
|
<button class="btn btn-danger float-right" name="action" value="remove">Remove</button>
|
|
|
|
{% endif %}
|
2020-03-08 12:30:48 +01:00
|
|
|
|
2020-04-28 20:25:40 +02:00
|
|
|
</div>
|
|
|
|
</form>
|
2020-03-08 12:30:48 +01:00
|
|
|
|
2020-04-28 20:25:40 +02:00
|
|
|
</div>
|
2020-03-08 12:30:48 +01:00
|
|
|
</div>
|
2020-02-23 08:08:55 +01:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
|
2020-05-07 13:28:04 +02:00
|
|
|
{% block script %}
|
|
|
|
<script>
|
|
|
|
$(".custom-switch-input").change(function (e) {
|
|
|
|
$(this).closest("form").submit();
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|
2020-02-23 08:08:55 +01:00
|
|
|
|