CYRADM(1)

✨ CYRADM(1) ✨

User Contributed Perl Documentation πŸ’… cyradm(1)


🌸 NAME 🌸

cyradm β€” the Cyrus administration shell, aka the alter ego of Cyrus::IMAP::Shell πŸ¦‹


✨ SYNOPSIS ✨

okay bestie, 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:

$ perl -MCyrus::IMAP::Shell -e 'run("myscript")'

or even (and listen, this one is not recommended πŸ™ˆ):

use Cyrus::IMAP::Admin::Shell;

run('myscriptname');

πŸ’– DESCRIPTION πŸ’–

This module implements cyradm in Perl, fr fr. It's a shell that wraps around Cyrus::IMAP::Admin 🫢

The commands come at you in two iconic flavors: Tcl-compatible forms, and GNU-style long option forms. Pick your fighter, both slay. πŸ‘‘


πŸ’… COMMANDS πŸ’…

okay bestie, this is the big one. every command you can type at the cyradm> prompt, in order, no skips. 🫢


🌸 authenticate, auth, login

"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]

Log in to the server, bestie. three names, one vibe β€” authenticate, auth, login, pick your fave.

🚨 two rules tho: you gotta already be connected to a server, and Cyrus imapd will flat-out refuse to let you re-authenticate once you've authenticated once. like, no takebacks. periodt.

πŸ¦‹ chdir, cd

"chdir" directory
"cd" directory

Change directory. iconic, we love.

so there's no pwd builtin β€” 😭 β€” but the default command action will run pwd from a shell if you invoke it. so you're not stranded, you're just taking the scenic route. iykyk


✨ createmailbox, create, cm

"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 a partition you pick yourself. you're the main character here.

both old-style and getopt-style usages are accepted β€” but combining them will produce an error, so pick a lane. πŸ’€

optionally assign a special use to the mailbox while you're at it. multitasking queen.


πŸŽ€ deleteaclmailbox, deleteacl, dam

"deleteaclmailbox" mailbox id [...]
"deleteacl" mailbox id [...]
"dam" mailbox id [...]

Remove ACLs from the specified mailbox. bye to those permissions specifically, not the mailbox. 🫢


πŸ’€ deletemailbox, delete, dm

"deletemailbox" mailbox
"delete" mailbox
"dm" mailbox

Delete the specified mailbox. gone. poof.

⚠️ huge caveat: administrators do not have implicit delete rights on mailboxes. like, not even admins get a free pass?? yeah. use the setaclmailbox command to grant the x permission to your principal if you need to delete a mailbox you do not own. don't skip this step, you will be so confused otherwise. πŸ™ˆ

🌈 disconnect, disc

"disconnect"
"disc"

Disconnect from the current server. the prompt will revert to cyradm> β€” back to home base, bestie. 🏠


🧚 exit, quit

"exit" [number]
"quit" [number]

Exit cyradm, optionally with a specific exit status. don't wanna pick one? that's fine, the exit status of the last command will be used if one is not specified. it just knows. ✨


⭐ help, ?

help [command]
? [command]

Show help for command, or all commands if you don't name one. asking for help is not a weakness, it's a flex. πŸ’…


πŸ’œ getmetadata, getmd

"getmetadata" [mailbox]
"getmd" [mailbox]

Display mailbox/server metadata. the receipts, basically.


πŸ“ info

"info" [mailbox]

Display the mailbox/server annotations. different thing from metadata, same energy. don't ask, just vibe. πŸŽ€


πŸ‘‘ listaclmailbox, listacl, lam

"listaclmailbox" mailbox
"listacl" mailbox
"lam" mailbox

List ACLs on the specified mailbox. who can do what, spelled out. the group chat roster but for permissions.


🌸 listmailbox, list, lm

"listmailbox" ["--subscribed"] ["--specialuse"] [pattern [reference]]
"list" ["--subscribed"] ["--specialuse"] [pattern [reference]]
"lm" ["--subscribed"] ["--specialuse"] [pattern [reference]]

List all mailboxes matching the pattern β€” or, with --subscribed, all subscribed ones, or with --specialuse, all special-use ones. filter it however you like. πŸ¦‹

the pattern can have embedded wildcards: * matches anything, and % matches anything except the separator character. two little symbols, so much power.

mailboxes returned will be relative to the specified reference if you give one β€” that's how you limit a mailbox list to a particular hierarchy. very targeted, very slay.

πŸ’‘ heads up: sometimes when % is used to end a pattern, it may match an entry which is not a mailbox but which contains other mailboxes. when that happens, the entry gets parenthesized to show that it's a root for other mailboxes, as opposed to a mailbox itself. so if you see (...) in your output, that's why. not a glitch, it's a feature. 🫢

✨ listquota, lq

"listquota" root
"lq" root

List quotas on the specified root. πŸ“Š

⚠️ if the specified mailbox path doesn't have a quota assigned, an error will be raised. yeah. see listquotaroot for a way to find the quota root for a mailbox β€” that's your rescue plan, bestie.

πŸŽ€ listquotaroot, lqm, lqr

"listquotaroot" mailbox
"lqm" mailbox
"lqr" mailbox?

Show quota roots and quotas for mailbox. 🌟


πŸ¦‹ mboxconfig, mboxcfg

"mboxconfig" ["--private"] mailbox attribute value
"mboxcfg" ["--private"] mailbox attribute value

Set mailbox metadata. with --private you set the private version instead of the shared version of the metadata. a value of none will remove the attribute. declutter era.

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. shared brain cell, but for read receipts.
  • 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.

πŸ’œ renamemailbox, rename, renm

"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. glow-up + relocation. ✨

both old-style and getopt-style usages are accepted; combining them will produce an error. again. pick one, bestie. πŸ’€


🌈 server, connect, servername

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.) so like, watch this space.

when you're connected to a server, the cyradm prompt changes from cyradm> to servername>, where servername is the fully qualified domain name of the connected server. your prompt tells you where you are. iconic behaviour.


πŸ‘‘ setaclmailbox, setacl, sam

"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

πŸ’– setinfo

"setinfo" attribute value

Set server metadata. a value of none will remove the attribute. same energy as mboxconfig but for the whole server.

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). nuclear option, use with care. πŸ’€
  • 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).

🌸 setmetadata, setmd

"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. you can't do it on someone else's behalf, 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"

⭐ setquota, sq

"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. unlimited storage arc. ✨


πŸ¦‹ version, ver

"version"
"ver"

Display the version info of the current server. know what you're working with.


🧚 xfermailbox, xfer

"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. 🚚 moving day!!

both old-style and getopt-style usages are accepted; combining them will produce an error. yes, again. it's a whole thing. πŸ’…


πŸ’­ NOTES πŸ’­

okay bestie, housekeeping time, and these lil facts WILL save you, no cap:

  • GNU-style long options? you gotta spell them out in their entirety, every letter, no shortcuts. Tcl-style options are the chill ones that may be abbreviated. pick your fighter.
  • speaking of, Tcl-style options are just there as a compatibility feature. like, they're probably gonna go away in the future. so don't get attached, it's giving expired situationship πŸ’€
  • you can stack multiple commands on one line, just separate them with ';' characters. one line, many tasks, main character energy.
  • every command sets an exit status. which, at present, is not useful. so like, it's there. it's doing nothing. it's the group chat lurker. πŸ™ˆ
  • type something cyradm doesn't recognize? it just gets passed to a subshell for execution. girl's flexible.
  • the Tcl version of cyradm is what you use for scripting and for chatting interactively. you can sorta script with it via the "run" method, but fr fr, actual scripting would normally be done with "Cyrus::IMAP::Admin" β€” which is far more flexible than either interactive "cyradm" or the Tcl scripting mechanism for Cyrus. so if you're building something real, go there.
  • cyradm gets /bin/sh-style redirection!! any command can have its standard or error output redirected, and all sh-style redirections are supported except "<>". but bestie, listen: it does not currently understand pipes or backgrounding. so no | shenanigans, no &. 😭
  • if the "Term::Readline::Perl" or "Term::Readline::GNU" modules are available, cyradm will use it. fancy line editing when you can get it, periodt. ✨
  • there's an alias facility implemented internally, but no access is currently provided to it. the tea is that this will change β€” if only so some of the predefined aliases can be removed if they conflict with useful shell commands. so watch this space πŸ‘€

πŸ‘‘ AUTHOR πŸ‘‘

Brandon S. Allbery, allbery@ece.cmu.edu

the original icon, we stan 🫢


πŸ¦‹ SEE ALSO πŸ¦‹


okay that's the whole page bestie, you're officially cyradm-literate πŸŒˆπŸ’… this masterpiece comes to you courtesy of perl v5.42.3, dated 2026-09-11 β€” yes she's documented, yes she's iconic, go run some commands and slay βœ¨πŸŽ€

πŸ“¦ where this page comes from