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 -->
2022-08-23 11:24:49 +02:00
{% if mailbox.pgp_finger_print and not mailbox.disable_pgp and current_user.include_sender_in_reverse_alias %}
< 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 > .
< / div >
{% endif %}
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-11-24 11:22:09 +01:00
{% if mailbox.pgp_finger_print %}
2022-06-29 11:28:26 +02:00
2020-11-24 11:22:09 +01:00
< form method = "post" >
< input type = "hidden" name = "form-name" value = "toggle-pgp" >
2022-06-29 11:28:26 +02:00
< 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 " } } >
2020-11-24 11:22:09 +01:00
< span class = "custom-switch-indicator" > < / span >
< / label >
< / form >
{% endif %}
< / div >
< div class = "small-text mt-1" >
By importing your PGP Public Key into SimpleLogin, all emails sent to {{ mailbox.email }} are
2022-06-29 11:28:26 +02:00
< b > encrypted< / b > with your key.
< br / >
{% if PGP_SIGNER %}All forwarded emails will be signed with < b > {{ PGP_SIGNER }}< / b > .{% endif %}
2020-11-24 11:22:09 +01:00
< / div >
< / div >
{% if not current_user.is_premium() %}
2020-03-08 12:30:48 +01:00
2022-06-29 11:28:26 +02:00
< div class = "alert alert-danger" role = "alert" > This feature is only available in premium plan.< / div >
{% endif %}
2020-11-25 17:29:54 +01:00
< form method = "post" >
< div class = "form-group" >
< label class = "form-label" > PGP Public Key< / label >
2022-06-29 11:28:26 +02:00
< textarea name = "pgp" { % if not current_user . is_premium ( ) % } disabled { % endif % } class = "form-control" rows = 10 id = "pgp-public-key" placeholder = "-----BEGIN PGP PUBLIC KEY BLOCK-----" > {{ mailbox.pgp_public_key or "" }}< / textarea >
2020-11-25 17:29:54 +01:00
< / div >
2020-11-24 11:22:09 +01:00
< input type = "hidden" name = "form-name" value = "pgp" >
2022-06-29 11:28:26 +02:00
< button class = "btn btn-primary" name = "action" { % if not current_user . is_premium ( ) % }
disabled {% endif %} value="save">
Save
2020-11-24 11:22:09 +01:00
< / button >
{% if mailbox.pgp_finger_print %}
2022-06-29 11:28:26 +02:00
2020-11-24 11:22:09 +01:00
< 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 >
2022-06-29 11:28:26 +02: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.
2022-06-29 11:28:26 +02:00
The original subject is then added into the email body.
< br / >
2020-11-07 12:58:51 +01:00
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 >
2022-06-29 11:28:26 +02: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 >
2022-06-29 11:28:26 +02:00
< input name = "generic-subject" { % if not mailbox . pgp_enabled ( ) % }
disabled {% endif %} class="form-control" maxlength="78" placeholder="Generic Subject" value="{{ mailbox.generic_subject or "" }}">
2020-05-09 22:29:32 +02:00
< / div >
2022-06-29 11:28:26 +02:00
< button class = "btn btn-primary" name = "action" { % if not mailbox . pgp_enabled ( ) % }
disabled {% endif %} value="save">
Save
< / button >
{% if mailbox.generic_subject %}
< button class = "btn btn-danger float-right" name = "action" value = "remove" > Remove< / button >
{% endif %}
2020-05-09 22:29:32 +02:00
< / div >
< / form >
< / div >
2022-06-29 11:28:26 +02:00
< hr / >
< h2 class = "h4" > Advanced Options< / h2 >
{% if spf_available %}
< div class = "card" id = "spf" >
< 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 %}
< 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 >
2020-09-28 21:09:20 +02:00
< / div >
2022-06-29 11:28:26 +02:00
{% 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 >
2020-09-28 21:09:20 +02:00
< / div >
< / div >
< / div >
2020-03-08 12:30:48 +01:00
< / div >
2022-06-29 11:28:26 +02:00
{% 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');
2022-07-04 16:01:04 +02:00
< / script >
{% endblock %}