mirror of
https://github.com/simple-login/app.git
synced 2025-02-24 15:53:22 +08:00
use log warning for mailbox issue
This commit is contained in:
parent
ad90a0c93e
commit
2d9abe55a4
1 changed files with 1 additions and 3 deletions
4
cron.py
4
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(),
|
||||
|
|
Loading…
Reference in a new issue