mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-22 02:17:26 +00:00
Merge pull request #727 from yodax/userlist
Allow files in /home/user-data/mail/mailboxes
This commit is contained in:
commit
2be373fd06
@ -137,19 +137,20 @@ def get_mail_users_ex(env, with_archived=False, with_slow_info=False):
|
|||||||
if with_archived:
|
if with_archived:
|
||||||
root = os.path.join(env['STORAGE_ROOT'], 'mail/mailboxes')
|
root = os.path.join(env['STORAGE_ROOT'], 'mail/mailboxes')
|
||||||
for domain in os.listdir(root):
|
for domain in os.listdir(root):
|
||||||
for user in os.listdir(os.path.join(root, domain)):
|
if os.path.isdir(os.path.join(root, domain)):
|
||||||
email = user + "@" + domain
|
for user in os.listdir(os.path.join(root, domain)):
|
||||||
mbox = os.path.join(root, domain, user)
|
email = user + "@" + domain
|
||||||
if email in active_accounts: continue
|
mbox = os.path.join(root, domain, user)
|
||||||
user = {
|
if email in active_accounts: continue
|
||||||
"email": email,
|
user = {
|
||||||
"privileges": "",
|
"email": email,
|
||||||
"status": "inactive",
|
"privileges": "",
|
||||||
"mailbox": mbox,
|
"status": "inactive",
|
||||||
}
|
"mailbox": mbox,
|
||||||
users.append(user)
|
}
|
||||||
if with_slow_info:
|
users.append(user)
|
||||||
user["mailbox_size"] = utils.du(mbox)
|
if with_slow_info:
|
||||||
|
user["mailbox_size"] = utils.du(mbox)
|
||||||
|
|
||||||
# Group by domain.
|
# Group by domain.
|
||||||
domains = { }
|
domains = { }
|
||||||
|
Loading…
Reference in New Issue
Block a user