do not disable mailbox in sanity_check
This commit is contained in:
parent
4ee38823b8
commit
df47ea1983
26
cron.py
26
cron.py
|
@ -285,32 +285,6 @@ def sanity_check():
|
|||
|
||||
LOG.d("Disable mailbox and all its aliases")
|
||||
|
||||
mailbox.verified = False
|
||||
for alias in mailbox.aliases:
|
||||
alias.enabled = False
|
||||
|
||||
db.session.commit()
|
||||
|
||||
email_msg = f"""Hi,
|
||||
|
||||
Your mailbox {mailbox.email} cannot receive emails.
|
||||
To avoid forwarding emails to an invalid mailbox, we have disabled this mailbox along with all of its aliases.
|
||||
|
||||
If this is a mistake, please reply to this email.
|
||||
|
||||
Thanks,
|
||||
SimpleLogin team.
|
||||
"""
|
||||
|
||||
try:
|
||||
send_email(
|
||||
mailbox.user.email,
|
||||
f"{mailbox.email} is disabled",
|
||||
email_msg,
|
||||
email_msg.replace("\n", "<br>"),
|
||||
)
|
||||
except Exception:
|
||||
LOG.error("Cannot send disable mailbox email to %s", mailbox.user)
|
||||
|
||||
LOG.d("Finish sanity check")
|
||||
|
||||
|
|
Loading…
Reference in a new issue