mirror of
https://github.com/simple-login/app.git
synced 2025-02-22 14:53:34 +08:00
mark a mailbox as unverified if it fails checks for too many times
This commit is contained in:
parent
e6dd2f1717
commit
f224d16c56
1 changed files with 2 additions and 1 deletions
3
cron.py
3
cron.py
|
@ -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
|
||||
|
||||
|
@ -309,7 +310,7 @@ def sanity_check():
|
|||
else: # reset nb check
|
||||
mailbox.nb_failed_checks = 0
|
||||
|
||||
db.session.commit()
|
||||
db.session.commit()
|
||||
|
||||
for user in User.filter_by(activated=True).all():
|
||||
if user.email.lower() != user.email:
|
||||
|
|
Loading…
Reference in a new issue