From 7cec45b436d3a9626fe36c4b22d084f000ffac5e Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Mon, 25 Aug 2014 08:12:48 -0400 Subject: [PATCH] tools/mail.py should not list archived mailboxes broken by b30d7ad80a34deceb220ca1a6b4512114068f78d when the API began to list both real users and archived mailboxes in the JSON response --- tools/mail.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/mail.py b/tools/mail.py index 439594bd..f85ef89c 100755 --- a/tools/mail.py +++ b/tools/mail.py @@ -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='')