CYRADM(1p)
β¨ NAME β¨
cyradm β the Cyrus administration shell, aka the alter ego of Cyrus::IMAP::Shell π
so like, this is CYRADM(1p), living in the User Contributed Perl Documentation section, and it is genuinely iconic π
πΈ SYNOPSIS πΈ
okay so here's how you summon her:
$ cyradm [--user user] [--[no]rc] [--systemrc file] [--userrc file] \
> [--port n] [--auth mechanism] [--tlskey keyfile] [--notls] \
> [--cafile cacertfile] [--cadir cacertdir] \
> [--server] server
but possibly β plot twist β like this instead:
$ perl -MCyrus::IMAP::Shell -e 'run("myscript")'
or even, and bestie I am telling you this is not recommended π:
use Cyrus::IMAP::Admin::Shell;
run('myscriptname');
π DESCRIPTION π
So. This module implements cyradm in Perl. She's a whole shell wrapped around Cyrus::IMAP::Admin β that's her main character energy right there β¨
And the commands? You get them in both flavors:
- Tcl-compatible forms π¦
- GNU-style long option forms π
it's giving versatile, it's giving bilingual, it's giving slay π
π COMMANDS π
Okay bestie, this is where cyradm actually does stuff. Every command, alias, option, and weird little note β all of it. Let's get into it. β¨
authenticate, auth, login β authenticate to the server
authenticate [--minssf N] [--maxssf N] [--mechanisms list] [--service name] [--tlskey keyfile] [--notls] [--cafile cacertfile] [--capath cacertdir] [user]
auth [--minssf N] [--maxssf N] [--mechanisms list] [--service name] [--tlskey keyfile] [--notls] [--cafile cacertfile] [--capath cacertdir] [user]
login [--minssf N] [--maxssf N] [--mechanisms list] [--service name] [--tlskey keyfile] [--notls] [--cafile cacertfile] [--capath cacertdir] [user]
This is your glow-up login moment. You gotta already be connected to a server, and Cyrus imapd will literally refuse to let you re-authenticate after you've authenticated once. One and done, bestie. No double-dipping. π
chdir, cd β change directory
chdir directory
cd directory
Classic directory hop. There's no pwd builtin, but if you invoke pwd, the default command action will run it from a shell. So it still works β just not as a builtin. The more you know. π
createmailbox, create, cm β create a mailbox
createmailbox [--partition partition] [--specialuse specialuse] mailbox
create [--partition partition] [--specialuse specialuse] mailbox
create [--specialuse specialuse] mailbox partition
cm [--partition partition] [--specialuse specialuse] mailbox
cm [--specialuse specialuse] mailbox partition
Make a mailbox on the default partition or one you specify. Both old-style and getopt-style usages are accepted, but combining them will produce an error β so don't mix them, periodt. You can also optionally assign a special use to the mailbox. Slay. β¨
deleteaclmailbox, deleteacl, dam β remove ACLs
deleteaclmailbox mailbox id [...]
deleteacl mailbox id [...]
dam mailbox id [...]
Remove ACLs from the specified mailbox. Yeet those permissions. Bye. π
deletemailbox, delete, dm β delete a mailbox
deletemailbox mailbox
delete mailbox
dm mailbox
Delete the specified mailbox. But heads up, bestie: administrators do not have implicit delete rights on mailboxes. No sneaky deletes. If you need to delete a mailbox you don't own, use the setaclmailbox command to grant the x permission to your principal. Important. π«Ά
disconnect, disc β disconnect from server
disconnect
disc
Dip out from the current server. The prompt will revert to cyradm>. Back to home base. π
exit, quit β leave cyradm
exit [number]
quit [number]
Exit cyradm, optionally with a specific exit status. If you don't give one, the exit status of the last command will be used. So it's giving "whatever just happened, that's my legacy." π
help, ? β show help
help [command]
? [command]
Show help for command or all commands. Your little manual within the manual. Iconic.
getmetadata, getmd β get metadata
getmetadata [mailbox]
getmd [mailbox]
Display mailbox/server metadata. All the behind-the-scenes tea. π
info β show annotations
info [mailbox]
Display the mailbox/server annotations. The little notes and lore.
listaclmailbox, listacl, lam β list ACLs
listaclmailbox mailbox
listacl mailbox
lam mailbox
List ACLs on the specified mailbox. Who can do what β exposed. π
listmailbox, list, lm β list mailboxes
listmailbox [--subscribed] [--specialuse] [pattern [reference]]
list [--subscribed] [--specialuse] [pattern [reference]]
lm [--subscribed] [--specialuse] [pattern [reference]]
List all mailboxes, all subscribed ones, or special-use ones that match the pattern. The pattern can have embedded wildcards * or % β * matches anything, % matches anything except the separator character. Very demure, very mindful.
Mailboxes returned will be relative to the specified reference if one is given. That lets you limit a mailbox list to a particular hierarchy. Love that for us.
In some cases when the % wildcard is used to end a pattern, it may match an entry which is not a mailbox but which contains other mailboxes. In that case, the entry will be parenthesized to show that it's a root for other mailboxes, as opposed to a mailbox itself. So if you see parentheses, that's why. π§
listquota, lq β list quotas
listquota root
lq root
List quotas on the specified root. If the specified mailbox path does not have a quota assigned, an error will be raised β awkward. See listquotaroot for a way to find the quota root for a mailbox. π
listquotaroot, lqm, lqr β list quota roots
listquotaroot mailbox
lqm mailbox
lqr mailbox?
Show quota roots and quotas for the mailbox. There they are.
mboxconfig, mboxcfg β set mailbox metadata
mboxconfig [--private] mailbox attribute value
mboxcfg [--private] mailbox attribute value
Set mailbox metadata. You can optionally set the private version instead of the shared version of the metadata. A value of none will remove the attribute. The currently supported attributes are:
commentβ Sets a comment or description associated with the mailbox.expireβ Sets the number of days after which messages will be expired from the mailbox.news2mailβ Sets an email address to which messages injected into the server via NNTP will be sent.pop3showafterβ Sets a time (in RFC3501 format, for example6-Jan-2011 11:45:32 +1100) which specifies a cutoff date such that POP3 fetching of the folder does not see messages whose internaldate is before or equal to the date.sharedseenβ Enables the use of a shared\Seenflag on messages rather than a per-user\Seenflag. Thesright in the mailbox ACL still controls whether a user can set the shared\Seenflag.sieveβ Indicates the name of the global sieve script that should be run when a message is delivered to the shared mailbox (not used for personal mailboxes).squatβ Indicates that the mailbox should have a squat index created for it./explicit/annotationβ Sets the annotation/explicit/annotationon mailbox to value.
Obsessed with the customization. π
renamemailbox, rename, renm β rename a mailbox
renamemailbox [--partition partition] oldname newname
rename [--partition partition] oldname newname
renm [--partition partition] oldname newname
renamemailbox oldname newname [partition]
rename oldname newname [partition]
renm oldname newname [partition]
Rename the specified mailbox, optionally moving it to a different partition. Both old-style and getopt-style usages are accepted; combining them will produce an error. So pick a lane, bestie. π¦
server, connect, servername β server connection
server [--noauthenticate] [server]
connect [--noauthenticate] [server]
servername [--noauthenticate] [server]
With no arguments, show the current server. With an argument, connect to that server. It will prompt for automatic login unless the --noauthenticate option is specified. (This may change; in particular, either automatic authentication will be removed or all authenticate options will be added.) Stay tuned, I guess. π
When connected to a server, the cyradm prompt changes from cyradm> to servername>, where servername is the fully qualified domain name of the connected server. Main character energy. π
setaclmailbox, setacl, sam β set ACLs
setaclmailbox mailbox id rights [id rights ...]
setacl mailbox id rights [id rights ...]
sam mailbox id rights [id rights ...]
Set ACLs on a mailbox. The ACL may be one of the special strings none, read (lrs), post (lrsp), append (lrsip), write (lrswipkxten), delete (lrxten), or all (lrswipkxten), or any combinations of the ACL codes:
lβ Lookup (mailbox is visible to LIST/LSUB, SUBSCRIBE mailbox)rβ Read (SELECT/EXAMINE the mailbox, perform STATUS)sβ Seen (set/clear\SEENflag via STORE, also set\SEENflag during APPEND/COPY/FETCH BODY[...])wβ Write flags other than\SEENand\DELETEDiβ Insert (APPEND, COPY destination)pβ Post (send mail to mailbox)kβ Create mailbox (CREATE new sub-mailboxes, parent for new mailbox in RENAME)xβ Delete mailbox (DELETE mailbox, old mailbox name in RENAME)tβ Delete messages (set/clear\DELETEDflag via STORE, also set\DELETEDflag during APPEND/COPY)eβ Perform EXPUNGE and expunge as part of CLOSEaβ Administer (SETACL/DELETEACL/GETACL/LISTRIGHTS)nβ Add, delete or modify annotations
Permission queen behavior. π
setinfo β set server metadata
setinfo attribute value
Set server metadata. A value of none will remove the attribute. The currently supported attributes are:
motdβ Sets a "message of the day". The message gets displayed as an ALERT after authentication.commentβ Sets a comment or description associated with the server.adminβ Sets the administrator email address for the server.shutdownβ Sets a shutdown message. The message gets displayed as an ALERT and all users are disconnected from the server (subsequent logins are disallowed).expireβ Sets the number of days after which messages will be expired from the server (unless overridden by a mailbox annotation).squatβ Indicates that all mailboxes should have a squat indexes created for them (unless overridden by a mailbox annotation).
Server gossip but make it config. β¨
setmetadata, setmd β set mailbox metadata
setmetadata [--private] mailbox [annotation] value
setmd [--private] mailbox [annotation] value
Set metadata on mailbox, where <annotation> is one of [comment|expire|news2mail|pop3showafter|sharedseen|sieve|specialuse|squat|/<explicit annotation>].
Note that flags with a leading backslash must be escaped with an additional backslash. For example:
setmetadata --private Spam specialuse "\\Junk"
Note, too, that private annotations are private to the user currently authenticated as, not necessarily the owner of the mailbox. To set annotations for another user you must authorize as that user. No shortcuts, bestie.
In addition to the use of optional flag --private, one may use a more explicit syntax, prefixing the annotation with /shared/ or /private/ as in this example:
setmetadata Spam /private/specialuse "\\Junk"
So many ways to say the same thing. π
setquota, sq β set quota
setquota root resource value [resource value ...]
sq root resource value [resource value ...]
Set a quota on the specified root, which may or may not be an actual mailbox. The only resource understood by Cyrus is STORAGE. The value may be the special string none, which will remove the quota. Magic. πͺ
version, ver β show version
version
ver
Display the version info of the current server. Know your server's lore. π
xfermailbox, xfer β transfer mailbox
xfermailbox [--partition partition] mailbox server
xfer [--partition partition] mailbox server
xfermailbox mailbox server [partition]
xfer mailbox server [partition]
Transfer (relocate) the specified mailbox to a different server. Both old-style and getopt-style usages are accepted; combining them will produce an error. Don't mix, bestie. π
π NOTES π
okay bestie, house rules time, and these ones actually matter:
- GNU-style long options have to be typed out in their entirety β no shortcuts, no vibes-based guessing. But Tcl-style options may be abbreviated. different rules for different girls fr.
- Tcl-style options are there as a compatibility feature, and they'll probably go away in the future. so likeβ¦ don't build your whole personality on them, bestie π
- You can stack multiple commands on one line, separated by
;characters. one line, many slays. - All commands set an exit status, which at present is not useful. it's giving decorative. it's giving participation trophy π
- Unknown commands are passed to a subshell for execution</kbd> β so if cyradm doesn't know her, she hands it off. π
The Tcl version of cyradm is used for scripting as well as interactively. And yes, you can do scripting to a limited extent by using the "run" method β but normally, scripting would be done with "Cyrus::IMAP::Admin", which is far more flexible than either interactive "cyradm" or the Tcl scripting mechanism for Cyrus. like, not even close bestie.
cyradm also understands /bin/sh-style redirection β any command can have its standard or error output redirected, and all sh-style redirections are supported, with one single exception: "<>". β¨
π¨ but hear me now: it does not currently understand pipes or backgrounding. no|, no&. she's not that kind of shell, don't ask her to be. π
If the "Term::Readline::Perl" or "Term::Readline::GNU" modules are available, cyradm will use it. line editing era. π
An alias facility is implemented internally, but no access is currently provided to it. This will change β if only to allow some of the predefined aliases to be removed if they conflict with useful shell commands. so likeβ¦ it exists. you just can't touch it yet. it's giving locked room energy π
π AUTHOR π
Brandon S. Allbery, allbery@ece.cmu.edu
we stan. absolute legend behavior, no cap. π«Ά
π¦ SEE ALSO π¦
and that's the whole page, bestie!! πΈ this diva is brought to you by perl v5.42.3, dated 2026-08-22, and filed under CYRADM(1p). slay, read it, use it responsibly, mwah πβ¨
π¦ where this page comes from
- ubuntu stonking: cyrus-admin 3.12.3-3build1 Β· CMU
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms