Changeset View
Changeset View
Standalone View
Standalone View
pykolab/cli/cmd_count_domain_mailboxes.py
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | def execute(*args, **kw): | ||||
auth = Auth() | auth = Auth() | ||||
auth.connect() | auth.connect() | ||||
domains = auth.list_domains() | domains = auth.list_domains() | ||||
folders = [] | folders = [] | ||||
for domain in domains.keys(): | for domain in domains.keys(): | ||||
print "%s: %d" % (domain,len(imap.lm("user/%%@%s" % (domain)))) | print("%s: %d" % (domain,len(imap.lm("user/%%@%s" % (domain))))) | ||||
null_realm = len(imap.lm("user/%%")) | null_realm = len(imap.lm("user/%%")) | ||||
if null_realm > 0: | if null_realm > 0: | ||||
print "null: %d" % (null_realm) | print("null: %d" % (null_realm)) | ||||