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 example 6-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 \Seen flag on messages rather than a per-user \Seen flag. The s right in the mailbox ACL still controls whether a user can set the shared \Seen flag.
  • 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/annotation on 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 \SEEN flag via STORE, also set \SEEN flag during APPEND/COPY/FETCH BODY[...])
  • w β€” Write flags other than \SEEN and \DELETED
  • i β€” 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 \DELETED flag via STORE, also set \DELETED flag during APPEND/COPY)
  • e β€” Perform EXPUNGE and expunge as part of CLOSE
  • a β€” 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