mirror of
https://github.com/simple-login/app.git
synced 2024-09-29 21:21:29 +02:00
handle Yahoo complaint for transactional email
This commit is contained in:
parent
8280acb266
commit
225a3ae750
@ -1479,6 +1479,12 @@ def handle_yahoo_complaint(msg: Message) -> bool:
|
|||||||
LOG.e("cannot find the alias")
|
LOG.e("cannot find the alias")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
user = User.get_by(email=to_header)
|
||||||
|
if user:
|
||||||
|
LOG.d("Handle transactional yahoo complaint for %s", user)
|
||||||
|
handle_yahoo_complain_for_transactional_email(user)
|
||||||
|
return True
|
||||||
|
|
||||||
_, alias_address = parse_full_address(get_header_unicode(to_header))
|
_, alias_address = parse_full_address(get_header_unicode(to_header))
|
||||||
alias = Alias.get_by(email=alias_address)
|
alias = Alias.get_by(email=alias_address)
|
||||||
|
|
||||||
@ -1508,6 +1514,22 @@ def handle_yahoo_complaint(msg: Message) -> bool:
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def handle_yahoo_complain_for_transactional_email(user):
|
||||||
|
"""Handle the case when a transactional email is set as Spam by user or by Yahoo"""
|
||||||
|
send_email_with_rate_control(
|
||||||
|
user,
|
||||||
|
ALERT_YAHOO_COMPLAINT,
|
||||||
|
user.email,
|
||||||
|
f"Yahoo abuse report",
|
||||||
|
render("transactional/yahoo-transactional-complaint.txt.jinja2", user=user),
|
||||||
|
render("transactional/yahoo-transactional-complaint.html", user=user),
|
||||||
|
max_nb_alert=1,
|
||||||
|
nb_day=7,
|
||||||
|
)
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
def handle_bounce_reply_phase(envelope, msg: Message, email_log: EmailLog):
|
def handle_bounce_reply_phase(envelope, msg: Message, email_log: EmailLog):
|
||||||
"""
|
"""
|
||||||
Handle reply phase bounce
|
Handle reply phase bounce
|
||||||
|
@ -0,0 +1,42 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
{% call text() %}
|
||||||
|
This is SimpleLogin team.
|
||||||
|
{% endcall %}
|
||||||
|
|
||||||
|
{% call text() %}
|
||||||
|
Yahoo has informed us about an email sent to <b>{{ user.email }}</b> that might have been considered as spam,
|
||||||
|
either by you or by Yahoo spam filter.
|
||||||
|
{% endcall %}
|
||||||
|
|
||||||
|
{% call text() %}
|
||||||
|
Please note that explicitly marking a SimpleLogin's forwarded email as Spam
|
||||||
|
affects SimpleLogin email delivery,
|
||||||
|
has a negative effect for all users and is a violation of our terms and condition.
|
||||||
|
{% endcall %}
|
||||||
|
|
||||||
|
{% call text() %}
|
||||||
|
If somehow Yahoo considers a forwarded email as Spam, it helps us if you can move the email
|
||||||
|
out of the Spam folder. You can also set up a filter to avoid this
|
||||||
|
from happening in the future using this guide at
|
||||||
|
https://simplelogin.io/docs/getting-started/troubleshooting/
|
||||||
|
|
||||||
|
{% endcall %}
|
||||||
|
|
||||||
|
{% call text() %}
|
||||||
|
Please don't put our emails into the Spam folder. This can end up in your account being disabled on SimpleLogin.
|
||||||
|
{% endcall %}
|
||||||
|
|
||||||
|
{% call text() %}
|
||||||
|
Looking to hear back from you.
|
||||||
|
{% endcall %}
|
||||||
|
|
||||||
|
{% call text() %}
|
||||||
|
Best, <br/>
|
||||||
|
SimpleLogin Team.
|
||||||
|
{% endcall %}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
|||||||
|
Hi,
|
||||||
|
|
||||||
|
This is SimpleLogin team.
|
||||||
|
|
||||||
|
Yahoo has informed us about an email sent to {{ user.email }} that might have been considered as spam,
|
||||||
|
either by you or by Yahoo.
|
||||||
|
|
||||||
|
Please note that explicitly marking a SimpleLogin's forwarded email as Spam
|
||||||
|
affects SimpleLogin email delivery,
|
||||||
|
has a negative effect for all users and is a violation of our terms and condition.
|
||||||
|
|
||||||
|
If somehow Yahoo considers a forwarded email as Spam, it helps us if you can move the email
|
||||||
|
out of the Spam folder. You can also set up a filter to avoid this
|
||||||
|
from happening in the future using this guide at
|
||||||
|
https://simplelogin.io/docs/getting-started/troubleshooting/
|
||||||
|
|
||||||
|
Please don't put our emails into the Spam folder. This can end up in your account being disabled on SimpleLogin.
|
||||||
|
|
||||||
|
Looking to hear back from you.
|
||||||
|
|
||||||
|
Best,
|
||||||
|
SimpleLogin Team.
|
Loading…
Reference in New Issue
Block a user