From 987b413e3d8460190186787d13becb1df0c194dc Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Thu, 11 Jun 2020 23:36:06 +0200 Subject: [PATCH] check if user and mailbox email address are lowercase in sanity_check --- cron.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cron.py b/cron.py index 8e4c67f1..61438e6c 100644 --- a/cron.py +++ b/cron.py @@ -283,8 +283,13 @@ def sanity_check(): mailbox.nb_email_log(), ) - LOG.d("Disable mailbox and all its aliases") + for user in User.filter_by(activated=True).all(): + if user.email.lower() != user.email: + LOG.error("%s does not have lowercase email", user) + for mailbox in Mailbox.filter_by(verified=True).all(): + if mailbox.email.lower() != mailbox.email: + LOG.error("%s does not have lowercase email", mailbox) LOG.d("Finish sanity check")