2020-02-23 08:08:55 +01:00
|
|
|
{% extends 'default.html' %}
|
|
|
|
|
|
|
|
{% set active_page = "mailbox" %}
|
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
Mailbox {{ mailbox.email }}
|
|
|
|
{% endblock %}
|
|
|
|
|
2020-11-07 12:58:51 +01:00
|
|
|
{% block head %}
|
|
|
|
<style>
|
|
|
|
div[disabled]
|
|
|
|
{
|
|
|
|
pointer-events: none;
|
|
|
|
opacity: 0.7;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
2020-02-23 08:08:55 +01:00
|
|
|
{% 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 %}
|
2020-11-24 11:18:16 +01:00
|
|
|
{% if mailbox.pgp_enabled() %}
|
2020-04-28 20:25:40 +02:00
|
|
|
<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-04-28 20:25:40 +02:00
|
|
|
<div class="card">
|
2020-11-24 11:22:09 +01:00
|
|
|
<div class="card-body">
|
|
|
|
<div class="card-title">
|
|
|
|
<div class="d-flex">
|
2020-04-28 20:25:40 +02:00
|
|
|
Pretty Good Privacy (PGP)
|
2020-03-08 22:59:46 +01:00
|
|
|
|
2020-11-24 11:22:09 +01:00
|
|
|
{% if mailbox.pgp_finger_print %}
|
|
|
|
<form method="post">
|
|
|
|
<input type="hidden" name="form-name" value="toggle-pgp">
|
|
|
|
|
|
|
|
<label class="custom-switch cursor" style="padding-left: 1rem"
|
|
|
|
data-toggle="tooltip"
|
|
|
|
{% if mailbox.disable_pgp %}
|
|
|
|
title="Enable PGP"
|
|
|
|
{% else %}
|
|
|
|
title="Disable PGP"
|
|
|
|
{% endif %}
|
|
|
|
>
|
|
|
|
<input type="checkbox" class="custom-switch-input" name="pgp-enabled"
|
|
|
|
{{ "" if mailbox.disable_pgp else "checked" }}>
|
|
|
|
<span class="custom-switch-indicator"></span>
|
|
|
|
</label>
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2020-03-19 19:15:42 +01:00
|
|
|
|
2020-11-24 11:22:09 +01:00
|
|
|
<div class="small-text mt-1">
|
|
|
|
By importing your PGP Public Key into SimpleLogin, all emails sent to {{ mailbox.email }} are
|
|
|
|
<b>encrypted</b> with your key. <br>
|
|
|
|
{% if PGP_SIGNER %}
|
|
|
|
All forwarded emails will be signed with <b>{{ PGP_SIGNER }}</b>.
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-08 12:30:48 +01:00
|
|
|
|
2020-11-24 11:22:09 +01:00
|
|
|
{% if not current_user.is_premium() %}
|
|
|
|
<div class="alert alert-danger" role="alert">
|
|
|
|
This feature is only available in premium plan.
|
2020-04-28 20:25:40 +02:00
|
|
|
</div>
|
2020-11-24 11:22:09 +01:00
|
|
|
{% endif %}
|
2020-03-08 12:30:48 +01:00
|
|
|
|
2020-11-25 17:29:54 +01:00
|
|
|
<form method="post">
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-label">PGP Public Key</label>
|
2020-11-24 11:22:09 +01:00
|
|
|
|
2020-11-25 17:29:54 +01: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-11-24 11:22:09 +01:00
|
|
|
|
|
|
|
<input type="hidden" name="form-name" value="pgp">
|
|
|
|
<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 %}
|
|
|
|
</form>
|
|
|
|
</div>
|
2020-04-28 20:25:40 +02:00
|
|
|
</div>
|
2020-05-09 22:29:32 +02:00
|
|
|
|
2020-11-24 11:18:16 +01:00
|
|
|
<div class="card" {% if not mailbox.pgp_enabled() %} disabled {% endif %}>
|
2020-11-07 12:58:51 +01:00
|
|
|
<form method="post">
|
|
|
|
<input type="hidden" name="form-name" value="generic-subject">
|
|
|
|
|
|
|
|
<div class="card-body">
|
|
|
|
<div class="card-title">
|
|
|
|
Hide email subject when PGP is enabled
|
|
|
|
<div class="small-text mt-1">
|
|
|
|
When PGP is enabled, you can choose to use a <b>generic</b> subject for the forwarded emails.
|
|
|
|
The original subject is then added into the email body. <br>
|
|
|
|
As PGP does not encrypt the email subject and the email subject might contain sensitive information,
|
|
|
|
this option will allow a further protection of your email content.
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-01-20 19:17:34 +01:00
|
|
|
<div class="alert alert-info">
|
|
|
|
As the email is encrypted, a subject like "Email for you"
|
|
|
|
will probably be rejected by your mailbox since it sounds like a spam. <br>
|
|
|
|
|
|
|
|
Something like "Encrypted Email" would work much better :).
|
|
|
|
</div>
|
2020-11-07 12:58:51 +01:00
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-label">Generic Subject</label>
|
|
|
|
|
|
|
|
<input name="generic-subject"
|
2020-11-24 11:18:16 +01:00
|
|
|
{% if not mailbox.pgp_enabled() %} disabled {% endif %}
|
2020-11-07 12:58:51 +01:00
|
|
|
class="form-control" maxlength="78"
|
|
|
|
placeholder="Generic Subject"
|
|
|
|
value="{{ mailbox.generic_subject or "" }}"
|
|
|
|
>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<button class="btn btn-primary" name="action"
|
2020-11-24 11:18:16 +01:00
|
|
|
{% if not mailbox.pgp_enabled() %} disabled {% endif %}
|
2020-11-07 12:58:51 +01:00
|
|
|
value="save">Save
|
|
|
|
</button>
|
|
|
|
{% if mailbox.generic_subject %}
|
|
|
|
<button class="btn btn-danger float-right" name="action" value="remove">Remove</button>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
2020-09-28 21:09:20 +02:00
|
|
|
<hr>
|
|
|
|
<h2 class="h4">Advanced Options</h2>
|
2020-05-10 09:21:55 +02:00
|
|
|
|
2020-09-28 21:09:20 +02:00
|
|
|
{% if spf_available %}
|
2020-05-09 23:00:30 +02:00
|
|
|
<div class="card" id="spf">
|
2020-05-09 22:29:32 +02:00
|
|
|
<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">
|
|
|
|
To avoid email-spoofing, SimpleLogin blocks email that
|
|
|
|
<em data-toggle="tooltip"
|
|
|
|
title="Email that has your mailbox as envelope-sender address">seems</em> to come from your
|
|
|
|
mailbox
|
|
|
|
but sent from <em data-toggle="tooltip"
|
|
|
|
title="IP Address that is not known by your mailbox email service">unknown</em>
|
|
|
|
IP address.
|
|
|
|
<br>
|
|
|
|
Only turn off this option if you know what you're doing :).
|
|
|
|
</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>
|
|
|
|
{% endif %}
|
2020-09-28 21:09:20 +02:00
|
|
|
|
|
|
|
<div class="card" id="authorized-address">
|
|
|
|
<div class="card-body">
|
|
|
|
<div class="card-title">
|
|
|
|
Authorized addresses
|
|
|
|
<div class="small-text">
|
|
|
|
Emails sent from these addresses to a <b>reverse-alias</b> are considered as being sent
|
|
|
|
from {{ mailbox.email }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% if mailbox.authorized_addresses | length == 0 %}
|
|
|
|
|
|
|
|
{% else %}
|
|
|
|
<ul>
|
|
|
|
{% for authorized_address in mailbox.authorized_addresses %}
|
|
|
|
<li>
|
|
|
|
{{ authorized_address.email }}
|
|
|
|
<form method="post" action="#authorized-address" style="display: inline">
|
|
|
|
<input type="hidden" name="form-name" value="delete-authorized-address">
|
|
|
|
<input type="hidden" name="authorized-address-id" value="{{ authorized_address.id }}">
|
|
|
|
<input type="submit" class="btn btn-sm btn-outline-warning" value="Delete">
|
|
|
|
</form>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<form method="post" action="#authorized-address" class="form-inline">
|
|
|
|
<input type="hidden" name="form-name" value="add-authorized-address">
|
|
|
|
<input type="email" name="email" size="50" class="form-control">
|
|
|
|
<input type="submit" class="btn btn-primary" value="Add">
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</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
|
|
|
|