CYRADM(8)
π¦ CYRADM(8) β Cyrus IMAP π¦
okay bestie, this one is literally called cyradm, it lives in section 8 of the manual, and it belongs to Cyrus IMAP. buckle up, we're doing admin things π
πΈ NAME πΈ
cyradm β Cyrus IMAP documentation
πΈ NAME (again, she's thorough) πΈ
Cyrus::IMAP::Shell β Perl version of cyradm πͺβ¨
β¨ SYNOPSIS β¨
so the main character entrance looks like this, no cap:
$ cyradm [--user authid] [--authz authzid] [--[no]rc] [--systemrc file] [--userrc file] \
> [--port n] [--auth mechanism] [--server] server
but possibly also this:
$ perl -MCyrus::IMAP::Shell -e 'run("myscript")'
or even this, and bestie I need you to know the manual itself says (not recommended) π:
use Cyrus::IMAP::Admin::Shell;
run('myscriptname');
π DESCRIPTION π
okay so. This module is cyradm, implemented in Perl. It's a shell wrapped around Cyrus::IMAP::Admin, and the commands come in both Tcl-compatible forms and GNU-style long option forms. two flavors, one icon π
The cyradm utility is a simple command line for doing the common admin tasks on a Cyrus IMAP server, and yes, it's written in Perl π«Ά
You can run cyradm two ways, and this is important:
- from a client where it's installed, connecting to the server via IMAP
- locally via a shell on the server itself
cyradm also understands /bin/sh-style redirection β any command can have its standard or error output redirected, and all the sh-style redirections are supported except <>. π
π lowkey important: it does not currently understand pipes or backgrounding. don't try it, she won't do it.
And if the Term::Readline::Perl or Term::Readline::GNU modules are available, cyradm will use it. fancy line editing, we love to see it β¨
π COMMAND-LINE ARGUMENTS π
--u,--user userβ authenticate with the username you specify. π--authz userβ authorize the connection as being the specified username.--norc,--rcβ (do not) load the configuration files.--systemrc fileβ use the system configuration file you specify.--userrc fileβ use the user configuration file you specify.--port portβ connect to the server specified, on the port specified.--auth mechanismβ use the mechanism specified to authenticate. One ofPLAIN,LOGIN, etc. π--helpβ show a help message about these command-line options. π«Ά--versionβ display the version of Cyrus IMAP that the currentcyradmcommand is a part of.--server serverβ the server address to connect to. π
more parts incoming bestie, don't go anywhere π
π COMMANDS π
Okay bestie, this is the main character section β every single command you can type at the cyradm> prompt. Buckle up. π¦
authenticate
authenticate [--minssf N] [--maxssf N] [--mechanisms list] [--service name] [--tlskey keyfile] [--notls] [--cafile cacertfile] [--capath cacertdir] user
Authenticate to a server. Lowkey important detail: you must already be connected to a server, and Cyrus imapd will refuse to let you re-authenticate once you've authenticated once. One shot, no take-backs. π
aliases: auth, login
chdir
chdir directory
Change directory. A pwd builtin is not provided, but the default command action will run pwd from a shell if invoked. So like, you still get your pwd β just the scenic route. π«Ά
aliases: cd
createmailbox
createmailbox [--partition partition] [--specialuse specialuse] mailbox
createmailbox [--specialuse specialuse] mailbox partition
Create a mailbox on the default partition or on a partition you specify. Both old-style and getopt-style usages are accepted (combining them will produce an error, so pick a lane, bestie). Optionally assign a special use to the mailbox. β¨
New mailboxes inherit the ACL permissions of their parent mailbox, except for top-level mailboxes such as the user's INBOX. Mailboxes that are the user's INBOX are assigned all to the corresponding user. π
Example Usage
localhost> :command:`cm user.john`
localhost> :command:`lm`
user.john (\HasNoChildren)
localhost> :command:`lam user.john`
john lrswipkxtecda
Note that in the above example, the unixhierarchysep setting in imapd.conf is set to 0. When using the UNIX hierarchy separator, the / (forward slash) character would be used as the hierarchy separator, and the example would look as follows:
Example Usage with unixhierarchysep: 1
localhost> :command:`cm user/john`
localhost> :command:`lm`
user/john (\HasNoChildren)
localhost> :command:`lam user/john`
john lrswipkxtecda
Note
The above examples use the unqualified, shorthand user identifier john as the mailbox name.
With the use of virtual domains, controlled through the virtdomains setting in imapd.conf(5).
aliases: cm, create
deleteaclmailbox
deleteaclmailbox mailbox id [...]
Remove ACLs from the specified mailbox. Bye-bye permissions. π§
aliases: delteacl, dam
deletemailbox
deletemailbox mailbox
Delete the specified mailbox.
Heads up, this one matters: Administrators do not have implicit delete rights on mailboxes. Use the setaclmailbox command to grant the x permission to your principal if you need to delete a mailbox you don't own. No sneaky admin shortcuts here. π
aliases: delete, dm
disconnect
disconnect
Disconnect from the current server. The prompt will revert to cyradm>. This does not quit cyradm β it's just hanging up the phone, you're still in the room. π
aliases: disc
exit
exit [number]
Exit cyradm, optionally with a specific exit status; the exit status of the last command will be used if one is not specified.
aliases: quit
help
help [command]
Show help for command, or for all the commands if you don't name one. Your built-in bestie. π«Ά
aliases: ?
getmetadata
getmetadata [mailbox]
Display mailbox/server metadata. π
aliases: getmd
info
info [mailbox]
Display the mailbox/server annotations.
listaclmailbox
listaclmailbox mailbox
List ACLs on the specified mailbox.
aliases: lam, listacl
listmailbox
listmailbox [--subscribed] [--specialuse] [pattern [reference]]
List all, or all subscribed or special-use, mailboxes matching the specified pattern. The pattern may have embedded wildcards \* or %, which match anything or anything except the separator character, respectively. Wildcards are giving "I contain multitudes." π
Mailboxes returned will be relative to the specified reference if one is specified. This allows a mailbox list to be limited to a particular hierarchy.
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 this case, the entry will be parenthesized to indicate that it is a root for other mailboxes, as opposed to a mailbox itself. So if you see parentheses, that's not a typo, that's a plot twist. π
aliases: list, lm
listquota
listquota root
List quotas on specified root. If the specified mailbox path does not have a quota assigned, an error will be raised; see listquotaroot for a way to find the quota root for a mailbox. π₯
aliases: lq
listquotaroot
listquotaroot mailbox
Show quota roots and quotas for mailbox.
aliases: lqm, lqr
mboxconfig
mboxconfig [--private] mailbox attribute value
Set mailbox metadata, optionally set the private instead of the shared version of the metadata. A value of "none" will remove the attribute. Poof. π
The currently supported attributes are:
commentdescription β Sets a comment or description associated with the mailbox.expiredays β Sets the number of days after which messages will be expired from the mailbox.news2mailaddress β Sets an email address to which messages injected into the server via NNTP will be sent.pop3showaftertime β 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.sharedseentrue|false β Enables the use of a sharedSeenflag on messages rather than a per-userSeenflag. Thesright in the mailbox ACL still controls whether a user can set the sharedSeenflag.sievescriptname β 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).squattrue|false β Indicates that the mailbox should have a squat index created for it.
aliases: mboxcfg
reconstruct
reconstruct [-r] mailbox
Reconstruct the specified mailbox, optionally recursing and reconstructing child mailboxes if the -r flag is given.
For more information see reconstruct(8).
renamemailbox
renamemailbox [--partition partition] oldname newname
renamemailbox 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. Two syntaxes, one mailbox, zero mixing. π
aliases: rename, renm
server
server
server [--noauthenticate] [server]
With no arguments, show the current server. With an argument, connect to that server. It will prompt for automatic login unless the --noauthenticateoption is specified. (This may change; in particular, either automatic authentication will be removed or all authenticate options will be added.) π¦
When connected to a server, cyradm's prompt changes from cyradm> to servername>, where servername is the fully qualified domain name of the connected server.
aliases: connect, servername
setaclmailbox
setaclmailbox 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(lrswipkxte), delete (lrxte), or all (lrswipkxte), or any combinations of the ACL codes:
lβ Lookup (mailbox is visible toLIST/LSUB,SUBSCRIBEmailbox)rβ Read (SELECT/EXAMINEthe mailbox, performSTATUS)sβ Seen (set/clearSEENflag viaSTORE, also setSEENflag duringAPPEND/COPY/FETCH BODY[...])wβ Write flags other thanSEENandDELETEDiβ Insert (APPEND,COPYdestination)pβ Post (send mail to mailbox)kβ Create mailbox (CREATEnew sub-mailboxes, parent for new mailbox inRENAME)xβ Delete mailbox (DELETEmailbox, old mailbox name inRENAME)tβ Delete messages (set/clearDELETEDflag viaSTORE, also setDELETEDflag duringAPPEND/COPY)eβ PerformEXPUNGEand expunge as part ofCLOSEaβ Administer (SETACL/DELETEACL/GETACL/LISTRIGHTS)
aliases: setacl, sam
setinfo
setinfo attribute value
Set server metadata. A value of "none" will remove the attribute. The currently supported attributes are:
motdmessage β Sets a "message of the day". The message gets displayed as anALERTupon connection.commentnote β Sets a comment or description associated with the server.adminaddress β Sets the administrator email address for the server.shutdownmessage β Sets a shutdown message. The message gets displayed as anALERTand all users are disconnected from the server (subsequent logins are disallowed).expiredays β Sets the number of days after which messages will be expired from the server (unless overridden by a mailbox annotation).squattrue|false β Indicates that all mailboxes should have a squat indexes created for them (unless overridden by a mailbox annotation).
setmetadata
setmetadata [--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 value 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. π
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"
aliases: setmd
setquota
setquota root resource value [resource value ...]
Set a quota on the specified root, which may or may not be an actual mailbox. The resources understood by Cyrus are STORAGE, MESSAGE, X-NUM-FOLDERS and X-ANNOTATION-STORAGE. The storage units are, as defined in RFC 2087, groups of 1024 octets (i.e. Kilobytes). The value may be the special string none which will remove the quota. β¨
aliases: sq
subscribe
subscribe mailbox
Subscribe to the given mailbox.
unsubscribe
unsubscribe mailbox
Unsubscribe to the given mailbox.
version
version
Display the version info of the current server. πΈ
aliases: ver
xfermailbox
xfermailbox [--partition partition] mailbox server
xfermailbox 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. Glow-up via relocation, no cap. π¦
aliases: xfer
π NOTES π
okay bestie, housekeeping time, pls read this bit π
- GNU-style long options have to be given in their entirety. no shortcuts. Tcl-style options though? those you may abbreviate. slay, but also read the next one.
- Tcl-style options are only there as a compatibility feature. and fr fr they'll probably go away in the future, so don't get too attached π₯²
- you can stack multiple commands on a line, just separate them with
;characters. very main character of you. - All commands set an exit status, which at present is not useful. iconic of it honestly.
- Unknown commands get passed to a subshell for execution. surprise! π
- the Tcl version of
cyradmis used for scripting as well as interactively. while this is possible to a limited extent by use of therunmethod, scripting would normally be done withCyrus::IMAP::Admin, which is far more flexible than either interactivecyradmor the Tcl scripting mechanism for Cyrus. iykyk β¨ cyradmunderstands/bin/sh-style redirection: any command can have its standard or error output redirected, with all sh-style redirections (except<>) supported π«Ά it does not currently understand pipes or backgrounding. no vibes there yet.- if the
Term::Readline::PerlorTerm::Readline::GNUmodules are available,cyradmwill use it. π - 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. tea β
π AUTHOR π
Brandon S. Allbery, allbery@ece.cmu.edu
π SEE ALSO π
Cyrus::IMAP::Admin, Term::ReadLine, sh(1), perl(1), imapd(8), imapd.conf(5), reconstruct(8)
imapd(8), imapd.conf(5), reconstruct(8).
π AUTHOR π
The Cyrus Team
π COPYRIGHT π
1993β2026, The Cyrus Team
okay bestie that's the whole page, we ate and left no crumbs π
β¨ this was cyradm version 3.12.4, dated Sep 09, 2026, from your favorite CYRADM(8) era. go forth and manage those mailboxes, you gorgeous nerd π¦ππ
π¦ where this page comes from
- fedora 44: cyrus-imapd 3.12.4-1.fc44 Β· BSD-Attribution-HPND-disclaimer
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms