Niels' suggestion to use cyradm command lm is correct, but the assertion that "...all of them list all mailboxes..." is not. IMAP supports wildcard characters, so one may list only the mailboxes within the "user" namespace like so:
Does it still need some cleanup? Yes, but it's not a bad start.nic@vultr1:~$ cyradm -u cyrus localhost Password: localhost> lm user/% user/cricket (\HasChildren) user/emergency (\HasNoChildren) user/emily (\HasChildren) user/friends (\HasNoChildren) user/jack (\HasChildren) user/jason (\HasChildren) user/john (\HasChildren) user/kathy (\HasChildren) user/ken (\HasChildren) user/nic (\HasChildren) user/therese (\HasChildren)
-nic
PS - BTW, the asterisk (*) is a match-all wildcard, while percent (%) is just one level
On 4/9/24 16:42, Niels Dettenbach via
Info wrote:
I am looking for a nice way to list all mailboxes (not the sub-boxes). The best without "user/". Cyrus 3.6.1. How do you do this?To get a simple line by line text list, the cyradm commands lm or lam are your bet. For a json output, ctl_mboxlist might help you better. But all of them list all mailboxes - including such you call „submailboxes“ here. I.e a user/abc and a shared/abc are different mailboxes. If you only want mailboxes on a specific level, you may filter the output externally by some regex based filter mechanism. Mailbox names consist of the „prefix“ (like „user“, „shared“ or whatever your cyrus server uses as namespaces. If you need the name without the prefix, you have to modify it by non cyrus mechanisms like grep, sed/awk or similar. Depending from your cyrus setup the mailboxes are represented by different prefixes, path elements etc. so that a more detailed answer is not possible without knowing that details. hth, niels. — Niels Dettenbach https://www.syndicat.com https://www.syndicat.com/pub_key.asc ------------------------------------------ Cyrus: Info Permalink: https://cyrus.topicbox.com/groups/info/T5c3b723599f1c213-M9c39c5dbadeac1e24057192d Delivery options: https://cyrus.topicbox.com/groups/info/subscription
-- Nic Bernstein nic@xxxxxxxxxxxxxxxx https://www.nicbernstein.com