mark a mailbox as unverified if it fails checks for too many times

This commit is contained in:
Son NK 2020-09-10 09:40:27 +02:00
parent e6dd2f1717
commit f224d16c56

View file

@ -297,6 +297,7 @@ 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.verified = False
else:
log_func = LOG.warning