From febb5c32343b85438756415697031b46377694e2 Mon Sep 17 00:00:00 2001 From: Chad Furman Date: Fri, 12 Jul 2024 14:01:12 -0400 Subject: [PATCH] removing box count / message count feature --- management/mailconfig.py | 5 ----- management/templates/users.html | 5 ----- 2 files changed, 10 deletions(-) diff --git a/management/mailconfig.py b/management/mailconfig.py index 2f44bf25..68adfba0 100755 --- a/management/mailconfig.py +++ b/management/mailconfig.py @@ -145,7 +145,6 @@ def get_mail_users_ex(env, with_archived=False): (user, domain) = email.split('@') box_size = 0 - box_count = 0 box_quota = 0 percent = '' try: @@ -155,7 +154,6 @@ def get_mail_users_ex(env, with_archived=False): for line in f.readlines(): (size, count) = line.split(' ') box_size += int(size) - box_count += int(count) try: percent = (box_size / box_quota) * 100 @@ -164,7 +162,6 @@ def get_mail_users_ex(env, with_archived=False): except: box_size = '?' - box_count = '?' box_quota = '?' percent = '?' @@ -178,7 +175,6 @@ def get_mail_users_ex(env, with_archived=False): "box_quota": box_quota, "box_size": sizeof_fmt(box_size) if box_size != '?' else box_size, "percent": '%3.0f%%' % percent if type(percent) != str else percent, - "box_count": box_count, "status": "active", } users.append(user) @@ -197,7 +193,6 @@ def get_mail_users_ex(env, with_archived=False): "privileges": [], "status": "inactive", "mailbox": mbox, - "box_count": '?', "box_size": '?', "box_quota": '?', "percent": '?', diff --git a/management/templates/users.html b/management/templates/users.html index e46b8391..e45fac05 100644 --- a/management/templates/users.html +++ b/management/templates/users.html @@ -63,7 +63,6 @@ - @@ -193,10 +192,6 @@ function show_users() { n.attr('data-email', user.email); n.attr('data-quota', user.quota); n.find('.address').text(user.email); - n.find('.box-count').text((user.box_count).toLocaleString('en')); - if (user.box_count == '?') { - n.find('.box-count').attr('title', 'Message count is unkown') - } n.find('.box-size').text(user.box_size); if (user.box_size == '?') { n.find('.box-size').attr('title', 'Mailbox size is unkown')