Common Tasks
This section shows examples of common tasks you’ll perform every day using cyradm: listing, creating, and deleting mailboxes; setting quotas; and setting ACLs.
Listing Mailboxes
The listmailbox (or lm) command returns a list of mailbox names that match the pattern given as an argument. The pattern can contain one of the wildcard characters asterisk (*) or percent (%). The * wildcard matches zero or more characters. The % wildcard is like the * wildcard, except that it only matches mailboxes at a single level in the mailbox hierarchy.
You can list all the users on the system by listing their top-level mailboxes (remember, a top-level mailbox is essentially the same as a username in the Cyrus namespace):
localhost>listmailbox user.%To list all mailboxes one level below abt0003 ’s top-level mailbox, you would use the % wildcard character to restrict output to include only that level:
localhost>listmailbox user.abt0003.%
user.abt0003.drafts user.abt0003.sent-mailTo list all users whose usernames begin with the letters abt, you would again use the % wildcard to restrict output to only top-level mailboxes:
localhost> listmailbox user.abt%
user.abt0003 user.abt0008The next example shows how the * wildcard character returns mailboxes that match the pattern at all levels of the mailbox hierarchy:
localhost>listmailbox user.abt*
user.abt0003 user.abt0003.sent-mail user.abt0008.drafts
user.abt0003.drafts user.abt0008Creating a Mailbox or Adding a User
The createmailbox (cm ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access