Changeset View
Changeset View
Standalone View
Standalone View
pykolab/cli/cmd_list_domain_mailboxes.py
Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | def execute(*args, **kw): | ||||
for primary,secondaries in domains: | for primary,secondaries in domains: | ||||
if not domain == primary and not domain in secondaries: | if not domain == primary and not domain in secondaries: | ||||
continue | continue | ||||
folders.extend(imap.lm("user/%%@%s" % (primary))) | folders.extend(imap.lm("user/%%@%s" % (primary))) | ||||
for secondary in secondaries: | for secondary in secondaries: | ||||
folders.extend(imap.lm("user/%%@%s" % (secondary))) | folders.extend(imap.lm("user/%%@%s" % (secondary))) | ||||
print "Deleted folders:" | print("Deleted folders:") | ||||
for folder in folders: | for folder in folders: | ||||
if not conf.raw: | if not conf.raw: | ||||
print imap_utf7.decode(folder) | print(imap_utf7.decode(folder)) | ||||
else: | else: | ||||
print folder | print(folder) |