2022-06-29 11:28:26 +02:00
{% extends "default.html" %}
2020-02-23 08:08:55 +01:00
{% set active_page = "mailbox" %}
2022-06-29 11:28:26 +02:00
{% block title %}Mailbox {{ mailbox.email }}{% endblock %}
2020-11-07 12:58:51 +01:00
{% block head %}
2022-06-29 11:28:26 +02:00
2020-11-07 12:58:51 +01:00
< 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" >
2022-06-29 11:28:26 +02:00
< h1 class = "h3" >
{{ mailbox.email }}
2020-04-28 20:25:40 +02:00
{% if mailbox.verified %}
2022-06-29 11:28:26 +02:00
< span class = "cursor"
data-toggle="tooltip"
data-original-title="Mailbox Verified">✅< / span >
2020-04-28 20:25:40 +02:00
{% else %}
2022-06-29 11:28:26 +02:00
< span class = "cursor"
data-toggle="tooltip"
data-original-title="Mailbox Not Verified">🚫< / span >
2020-04-28 20:25:40 +02:00
{% endif %}
2020-11-24 11:18:16 +01:00
{% if mailbox.pgp_enabled() %}
2022-06-29 11:28:26 +02:00
< span class = "cursor"
data-toggle="tooltip"
data-original-title="PGP Enabled">🗝< / span >
2020-04-28 20:25:40 +02:00
{% endif %}
< / h1 >
{% if not mailbox.verified %}
2022-06-29 11:28:26 +02:00
2020-04-28 20:25:40 +02:00
< div class = "alert alert-info" >
Mailbox not verified, please check your inbox/spam folder for the verification email.
2022-06-29 11:28:26 +02:00
< br / >
2020-04-28 20:25:40 +02:00
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-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 }}
< div class = "card-body" >
2022-06-29 11:28:26 +02:00
< div class = "card-title" > Change Mailbox Address< / div >
2020-04-28 20:25:40 +02:00
< 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 %}
2022-06-29 11:28:26 +02:00
2020-04-28 20:25:40 +02:00
< 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 -->
2023-08-09 09:56:53 +02:00
<!-- Not show PGP option for Proton mailbox -->
{% if mailbox.is_proton() and not mailbox.pgp_enabled() %}
2022-08-23 11:24:49 +02:00
< div class = "alert alert-info" >
2023-08-09 09:56:53 +02:00
As an email is always encrypted at rest in Proton Mail, having SimpleLogin also encrypt your email is redundant and does not add any security benefit.
< br >
The PGP option on SimpleLogin is instead useful for when your mailbox provider isn't encrypted by default like Gmail, Outlook, etc.
2022-08-23 11:24:49 +02:00
< / div >
{% endif %}
2023-08-09 09:56:53 +02:00
< div class = "{% if mailbox . is_proton ( ) and not mailbox . pgp_enabled ( ) % }
disabled-content{% endif %}">
{% if mailbox.pgp_finger_print and not mailbox.disable_pgp and current_user.include_sender_in_reverse_alias and not mailbox.is_proton() %}
2022-06-29 11:28:26 +02:00
2023-08-09 09:56:53 +02:00
< div class = "alert alert-info" >
Email headers like < span class = "italic" > From, To, Subject< / span > aren't encrypted by PGP.
Currently, your reverse alias includes the sender address.
You can disable this on < a href = "/dashboard/setting#sender-in-ra" > Settings< / a > .
2020-11-24 11:22:09 +01:00
< / div >
2023-08-09 09:56:53 +02:00
{% endif %}
< div class = "card" >
2020-11-07 12:58:51 +01:00
< div class = "card-body" >
< div class = "card-title" >
2023-08-09 09:56:53 +02:00
< div class = "d-flex" >
Pretty Good Privacy (PGP)
{% if mailbox.pgp_finger_print %}
< form method = "post" >
{{ csrf_form.csrf_token }}
< 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-11-07 12:58:51 +01:00
< div class = "small-text mt-1" >
2023-08-09 09:56:53 +02:00
By importing your PGP Public Key into SimpleLogin, all emails sent to {{ mailbox.email }} are
< b > encrypted< / b > with your key.
2022-06-29 11:28:26 +02:00
< br / >
2023-08-09 09:56:53 +02:00
{% if PGP_SIGNER %}All forwarded emails will be signed with < b > {{ PGP_SIGNER }}< / b > .{% endif %}
2020-11-07 12:58:51 +01:00
< / div >
< / div >
2023-08-09 09:56:53 +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 %}
< form method = "post" >
{{ csrf_form.csrf_token }}
< div class = "form-group" >
< label class = "form-label" > PGP Public Key< / label >
< textarea name = "pgp" { % if not current_user . is_premium ( ) % } disabled { % endif % } class = "form-control" rows = 10 id = "pgp-public-key" placeholder = "(Drag and drop or paste your pgp public key here) -----BEGIN PGP PUBLIC KEY BLOCK-----" > {{ mailbox.pgp_public_key or "" }}< / textarea >
2020-05-09 22:29:32 +02:00
< / div >
2023-08-09 09:56:53 +02:00
< input type = "hidden" name = "form-name" value = "pgp" >
< button class = "btn btn-primary" name = "action" { % if not current_user . is_premium ( ) % }
2022-06-29 11:28:26 +02:00
disabled {% endif %} value="save">
Save
< / button >
2023-08-09 09:56:53 +02:00
{% if mailbox.pgp_finger_print %}
2022-06-29 11:28:26 +02:00
< button class = "btn btn-danger float-right" name = "action" value = "remove" > Remove< / button >
{% endif %}
2023-08-09 09:56:53 +02:00
< / form >
< / div >
< / div >
2023-08-24 22:47:31 +02:00
< / div >
< div class = "card" id = "generic-subject" >
< form method = "post" action = "#generic-subject" >
{{ csrf_form.csrf_token }}
< input type = "hidden" name = "form-name" value = "generic-subject" >
< div class = "card-body" >
< div class = "card-title" >
Hide email subject
< div class = "small-text mt-1" >
The original subject will be added to the email body and all forwarded emails will have the generic subject.
2023-08-09 09:56:53 +02:00
< br / >
2023-08-24 22:47:31 +02:00
This option is often used when PGP is enabled.
As PGP does not encrypt the email subject, it allows a further protection of your email content.
2023-08-09 09:56:53 +02:00
< / div >
2023-08-24 22:47:31 +02:00
< / div >
< div class = "form-group" >
< label class = "form-label" > Generic Subject< / label >
< input name = "generic-subject"
class="form-control"
maxlength="78"
placeholder="Generic Subject"
value="{{ mailbox.generic_subject or "" }}">
< / div >
< button class = "btn btn-primary" name = "action" value = "save" > Save< / button >
{% if mailbox.generic_subject %}
2023-08-09 09:56:53 +02:00
2023-08-24 22:47:31 +02:00
< button class = "btn btn-danger float-right" name = "action" value = "remove" > Remove< / button >
{% endif %}
2023-08-09 09:56:53 +02:00
< / div >
2023-08-24 22:47:31 +02:00
< / form >
< / div >
< hr / >
< h2 class = "h4" > Advanced Options< / h2 >
{% if spf_available %}
2022-06-29 11:28:26 +02:00
2023-08-24 22:47:31 +02:00
< div class = "card" id = "spf" >
< form method = "post" >
{{ csrf_form.csrf_token }}
< 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"
2022-06-29 11:28:26 +02:00
title="IP Address that is not known by your mailbox email service">unknown< / em >
2023-08-24 22:47:31 +02:00
IP address.
< br / >
Only turn off this option if you know what you're doing :).
2022-06-29 11:28:26 +02:00
< / div >
< / div >
2023-08-24 22:47:31 +02:00
< 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 %}
< 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 }}
2020-09-28 21:09:20 +02:00
< / div >
2023-08-24 22:47:31 +02:00
< / div >
{% if mailbox.authorized_addresses | length == 0 %}
2022-06-29 11:28:26 +02:00
2023-08-24 22:47:31 +02:00
{% else %}
< ul >
{% for authorized_address in mailbox.authorized_addresses %}
2022-06-29 11:28:26 +02:00
2023-08-24 22:47:31 +02:00
< li >
{{ authorized_address.email }}
< form method = "post" action = "#authorized-address" style = "display: inline" >
{{ csrf_form.csrf_token }}
< 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" >
{{ csrf_form.csrf_token }}
< input type = "hidden" name = "form-name" value = "add-authorized-address" >
< input type = "email" name = "email" size = "50" class = "form-control" required >
< input type = "submit" class = "btn btn-primary" value = "Add" >
< / form >
2020-09-28 21:09:20 +02:00
< / div >
< / div >
2020-03-08 12:30:48 +01:00
< / div >
2023-08-24 22:47:31 +02:00
< / div >
{% endblock %}
{% block script %}
< script src = "/static/js/utils/drag-drop-into-text.js" > < / script >
< script >
2020-05-07 13:28:04 +02:00
$(".custom-switch-input").change(function (e) {
$(this).closest("form").submit();
});
2022-02-25 14:58:38 +01:00
enableDragDropForPGPKeys('#pgp-public-key');
2023-08-24 22:47:31 +02:00
< / script >
{% endblock %}