Skip to content

Commit

Permalink
removing box count / message count feature
Browse files Browse the repository at this point in the history
  • Loading branch information
chadfurman committed Oct 1, 2024
1 parent de8a770 commit f0b0b04
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
5 changes: 0 additions & 5 deletions management/mailconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -164,7 +162,6 @@ def get_mail_users_ex(env, with_archived=False):

except:
box_size = '?'
box_count = '?'
box_quota = '?'
percent = '?'

Expand All @@ -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)
Expand All @@ -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": '?',
Expand Down
5 changes: 0 additions & 5 deletions management/templates/users.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ <h3>Existing mail users</h3>
<tr id="user-template">
<td class='address'>
</td>
<td class="box-count row-center"></td>
<td class="box-size row-center"></td>
<td class="percent row-center"></td>
<td class="quota row-center">
Expand Down Expand Up @@ -193,10 +192,6 @@ <h4>Examples:</h4>
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')
Expand Down

0 comments on commit f0b0b04

Please sign in to comment.