diff --git a/app/handler/dmarc.py b/app/handler/dmarc.py index 8ba6d0a9..75633000 100644 --- a/app/handler/dmarc.py +++ b/app/handler/dmarc.py @@ -140,7 +140,7 @@ def apply_dmarc_policy_for_reply_phase( alias_from.user.email, f"Attempt to send an email to your contact {contact_recipient.email} from {envelope.mail_from}", render( - "transactional/spoof-reply.txt", + "transactional/spoof-reply.txt.jinja2", contact=contact_recipient, alias=alias_from, sender=envelope.mail_from, diff --git a/templates/emails/transactional/spoof-reply.html b/templates/emails/transactional/spoof-reply.html index 83766dba..576c1a2b 100644 --- a/templates/emails/transactional/spoof-reply.html +++ b/templates/emails/transactional/spoof-reply.html @@ -2,19 +2,21 @@ {% block content %} - {% call text() %} -

- An attempt to send a fake email to {{ contact.email }} from your alias {{ alias.email }} using {{ sender }} has been blocked. -

- {% endcall %} + {% call text() %} +

+ Unauthorized attempt to send an email to {{ contact.email }} from your alias {{ alias.email }} using + {{ sender }} has been blocked. +

+ {% endcall %} - {% call text() %} - As a measure to protect against email spoofing, we have blocked an attempt to send an email from your alias {{ alias.email }} using {{ sender }}. - {% endcall %} + {% call text() %} + To protect against email spoofing, only your mailbox can send emails on behalf of your alias. + SimpleLogin also refuses emails that claim to come from your mailbox but fail DMARC. + {% endcall %} - {% call text() %} - Best,
- SimpleLogin Team. - {% endcall %} + {% call text() %} + Best,
+ SimpleLogin Team. + {% endcall %} {% endblock %} diff --git a/templates/emails/transactional/spoof-reply.txt b/templates/emails/transactional/spoof-reply.txt deleted file mode 100644 index 22d27018..00000000 --- a/templates/emails/transactional/spoof-reply.txt +++ /dev/null @@ -1,8 +0,0 @@ -{% extends "base.txt.jinja2" %} - -{% block content %} -An attempt to send a fake email to {{ contact.email }} from your alias {{ alias.email }} using {{ sender }} has been blocked. - -As a measure to protect against email spoofing, we have blocked an attempt to send an email from your alias {{ alias.email }} using {{ sender }}. -{% endblock %} - diff --git a/templates/emails/transactional/spoof-reply.txt.jinja2 b/templates/emails/transactional/spoof-reply.txt.jinja2 new file mode 100644 index 00000000..7a1e0d9f --- /dev/null +++ b/templates/emails/transactional/spoof-reply.txt.jinja2 @@ -0,0 +1,10 @@ +{% extends "base.txt.jinja2" %} + +{% block content %} + Unauthorized attempt to send an email to {{ contact.email }} from your alias {{ alias.email }} using + {{ sender }} has been blocked. + + To protect against email spoofing, only your mailbox can send emails on behalf of your alias. + SimpleLogin also refuses emails that claim to come from your mailbox but fail DMARC. +{% endblock %} +