use warning level for email and mailbox same domain error. Update email wording.

This commit is contained in:
Son NK 2020-12-21 09:39:26 +01:00
parent da5bb6f9b5
commit 6441c22bcd
3 changed files with 24 additions and 12 deletions

View File

@ -564,7 +564,7 @@ def forward_email_to_mailbox(
# sanity check: make sure mailbox is not actually an alias # sanity check: make sure mailbox is not actually an alias
if get_email_domain_part(alias.email) == get_email_domain_part(mailbox.email): if get_email_domain_part(alias.email) == get_email_domain_part(mailbox.email):
LOG.exception( LOG.warning(
"Mailbox has the same domain as alias. %s -> %s -> %s", "Mailbox has the same domain as alias. %s -> %s -> %s",
contact, contact,
alias, alias,
@ -575,7 +575,7 @@ def forward_email_to_mailbox(
user, user,
ALERT_MAILBOX_IS_ALIAS, ALERT_MAILBOX_IS_ALIAS,
user.email, user.email,
f"Your SimpleLogin mailbox {mailbox.email} cannot be an email alias", f"Your mailbox {mailbox.email} and alias {alias.email} use the same domain",
render( render(
"transactional/mailbox-invalid.txt", "transactional/mailbox-invalid.txt",
name=user.name or "", name=user.name or "",

View File

@ -1,19 +1,27 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block content %}
{{ render_text("Hi " + name) }}
{% call text() %} {% call text() %}
We have detected that your mailbox <b>{{ mailbox.email }}</b> cannot receive emails as it's a SimpleLogin alias. <h1>
Your mailbox {{ mailbox.email }} and alias {{alias.email}} <b>cannot</b> have the same domain.
</h1>
{% endcall %} {% endcall %}
{% call text() %} {% call text() %}
A mailbox needs to be a "final" email address and cannot be an email alias. The alias domain should point to SimpleLogin servers so emails sent to it are forwarded by SimpleLogin.
{% endcall %} {% endcall %}
{% call text() %} {% call text() %}
Please update this mailbox to a non-alias email address on The mailbox domain should be your "final" email address that can receive emails from SimpleLogin
<a href="{{ mailbox_url }}">{{ mailbox.email }} setting</a>. and cannot point to SimpleLogin.
{% endcall %}
{% call text() %}
Please either: <br>
<ul>
<li>update the mailbox to a final email address on {{ mailbox_url }}</li>
<li>remove {{alias.email}} domain from your custom domains</li>
</ul>
{% endcall %} {% endcall %}
{% call text() %} {% call text() %}

View File

@ -1,11 +1,15 @@
Hi {{name}} Hi {{name}}
We have detected that your mailbox {{ mailbox.email }} cannot receive emails as it's a SimpleLogin alias. Your mailbox {{ mailbox.email }} and alias {{alias.email}} cannot use the same domain.
A mailbox needs to be a "final" email address and cannot be an email alias. The alias domain should point to SimpleLogin servers so emails sent to it are forwarded by SimpleLogin.
Please update this mailbox to a non-alias email address on The mailbox domain should be your "final" email address that can receive emails from SimpleLogin
{{ mailbox_url }} and cannot point to SimpleLogin.
Please either
- update the mailbox to a final email address on {{ mailbox_url }}
- remove {{alias.email}} domain from your custom domains
Feel free reply to this email if you have any question. Feel free reply to this email if you have any question.