From 2d9abe55a448a5ece9c4b84e2eebf365c168f18e Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Wed, 14 Oct 2020 09:32:33 +0200 Subject: [PATCH] use log warning for mailbox issue --- cron.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cron.py b/cron.py index 66d04e75..4d6dd6e0 100644 --- a/cron.py +++ b/cron.py @@ -314,7 +314,6 @@ def sanity_check(): if not email_domain_can_be_used_as_mailbox(mailbox.email): mailbox.nb_failed_checks += 1 nb_email_log = nb_email_log_for_mailbox(mailbox) - log_func = LOG.warning # send a warning if mailbox.nb_failed_checks == 5: @@ -333,7 +332,6 @@ def sanity_check(): # alert if too much fail and nb_email_log > 100 if mailbox.nb_failed_checks > 10 and nb_email_log > 100: - log_func = LOG.exception mailbox.disabled = True if mailbox.user.email != mailbox.email: @@ -344,7 +342,7 @@ def sanity_check(): render("transactional/disable-mailbox.html", mailbox=mailbox), ) - log_func( + LOG.warning( "issue with mailbox %s domain. #alias %s, nb email log %s", mailbox, mailbox.nb_alias(),