mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-12-22 07:17:05 +00:00
tools/mail.py should not list archived mailboxes
broken by b30d7ad80a
when the API began to list both real users and archived mailboxes in the JSON response
This commit is contained in:
parent
e0dc8ff04a
commit
7cec45b436
@ -67,6 +67,7 @@ elif sys.argv[1] == "user" and len(sys.argv) == 2:
|
||||
# Dump a list of users, one per line. Mark admins with an asterisk.
|
||||
users = mgmt("/mail/users?format=json", is_json=True)
|
||||
for user in users:
|
||||
if user['status'] == 'inactive': continue
|
||||
print(user['email'], end='')
|
||||
if "admin" in user['privileges']:
|
||||
print("*", end='')
|
||||
|
Loading…
Reference in New Issue
Block a user