From df47ea198369c98cf3b142cd0a4a9a91da111afa Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Thu, 11 Jun 2020 23:35:44 +0200 Subject: [PATCH] do not disable mailbox in sanity_check --- cron.py | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/cron.py b/cron.py index 1577b86a..8e4c67f1 100644 --- a/cron.py +++ b/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", "
"), - ) - except Exception: - LOG.error("Cannot send disable mailbox email to %s", mailbox.user) LOG.d("Finish sanity check")