CYRADM(8)
๐ CYRADM(8) ๐
cyradm โ Cyrus IMAP documentation โจ
Cyrus::IMAP::Shell โ Perl version of cyradm ๐ฆ
okay bestie sit DOWN because we're about to make admin'ing a Cyrus IMAP server feel like a group chat ๐
๐ธ SYNOPSIS ๐ธ
$ cyradm [--user authid] [--authz authzid] [--[no]rc] [--systemrc file] [--userrc file] \
> [--port n] [--auth mechanism] [--server] server
but possibly, like, if you're feeling spicy ๐
$ perl -MCyrus::IMAP::Shell -e 'run("myscript")'
or even โ and listen, not recommended ๐
use Cyrus::IMAP::Admin::Shell;
run('myscriptname');
โจ DESCRIPTION โจ
So this module implements cyradm in Perl, periodt. It's a shell wrapped around Cyrus::IMAP::Admin. Commands come in both Tcl-compatible forms and GNU-style long option forms โ iconic, honestly. ๐
The cyradm utility is a simple command line for doing common administrative tasks on a Cyrus IMAP server, and it's written in Perl. Lowkey legendary.
The cyradm utility can either be run from a client where it's been installed and connect to the server via IMAP, or it can be executed locally via a shell right on the server. Flex either way. ๐ช
cyradm understands /bin/sh-style redirection: any command can have its standard or error output redirected, and it supports all sh-style redirections โ except <>. It does not currently understand pipes or backgrounding, so don't come for it, it's doing its best ๐ญ
If the Term::Readline::Perl or Term::Readline::GNU modules are available, cyradm will use it. Slay. ๐
๐ COMMAND-LINE ARGUMENTS ๐
--u,--useruser โ authenticate with the username you specified, bestie. ๐--authzuser โ authorize the connection as if it were the specified user. It's giving "yes I'm them, trust." ๐ชช--norc,--rcโ (do not) load the configuration files. Your call ๐--systemrcfile โ use the system configuration file you specify.--userrcfile โ use the user configuration file you specify.--portport โ connect to the server specified, on the port specified. ๐--authmechanism โ use the mechanism specified to authenticate. One ofPLAIN,LOGIN, etc. Pick your fighter โจ--helpโ show a help message all about these command-line options ๐ซถ--versionโ display the version of Cyrus IMAP that the currentcyradmcommand is a part of. Know your lineage ๐--serverserver โ the server address to connect to. Go find your server, main character ๐ง
ngl that's just part 1 โ there's more coming, so stay tuned bestie ๐
๐ COMMANDS ๐
okay bestie, this is the whole command menu and it's giving main character energy. every command is a little vibe, and you're about to know all of them. no cap. โจ
๐ authenticate ๐
authenticate [--minssf N] [--maxssf N] [--mechanisms list] [--service name] [--tlskey keyfile] [--notls] [--cafile cacertfile] [--capath cacertdir] user
Authenticate to server. You must already be connected to a server and Cyrus imapd will refuse to allow you to re-authenticate once you have authenticated once. periodt.
- 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. lowkey handy.
- aliases:
cd
๐ฌ createmailbox ๐ฌ
createmailbox [--partition partition] [--specialuse specialuse] mailbox
createmailbox [--specialuse specialuse] mailbox partition
Create a mailbox on the default or a specified partition. Both old-style and getopt-style usages are accepted (combining them will produce an error). 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
johnas 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. simple as that, bestie.
- aliases:
delteacl,dam
๐ฎ deletemailbox ๐ฎ
deletemailbox mailbox
Delete the specified mailbox.
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 do not own. no cap.
- aliases:
delete,dm
๐ disconnect ๐
disconnect
Disconnect from the current server. The prompt will revert to cyradm>. This does not quit cyradm. bye bestie, but not forever.
- 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. okay bye โจ
- aliases:
quit
โ help โ
help [command]
Show help for command or all commands. the way that this is giving supportive bestie.
- aliases:
?
๐ท๏ธ getmetadata ๐ท๏ธ
getmetadata [mailbox]
Display mailbox/server metadata. it's giving receipts.
- aliases:
getmd
โน๏ธ info โน๏ธ
info [mailbox]
Display the mailbox/server annotations. lowkey important.
๐ listaclmailbox ๐
listaclmailbox mailbox
List ACLs on the specified mailbox. slay.
- 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. iykyk.
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. the drama.
- 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. bestie, don't get caught lacking.
- aliases:
lq
๐ฑ listquotaroot ๐ฑ
listquotaroot mailbox
Show quota roots and quotas for mailbox. it's giving root energy.
- 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.
The currently supported attributes are, bestie:
- comment description โ Sets a comment or description associated with the mailbox. cute.
- expire days โ Sets the number of days after which messages will be expired from the mailbox. they're gone, periodt.
- news2mail address โ Sets an email address to which messages injected into the server via NNTP will be sent. no cap.
- pop3showafter time โ 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. lowkey timezone math. - sharedseen
true|falseโ 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. the way that this is giving shared responsibility. - sieve scriptname โ 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). slay.
- squat
true|falseโ Indicates that the mailbox should have a squat index created for it. iconic. - aliases:
mboxcfg
๐ง reconstruct ๐ง
reconstruct [-r] mailbox
Reconstruct the specified mailbox, optionally recursing and reconstructing child mailboxes if the -r flag is given. bestie, this is the healing era.
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. no mixing, bestie.
- 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.) okay so that's the tea.
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. glow up.
- 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. okay so let's break down the alphabet, bestie:
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 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 DELETED flag via STORE, also set DELETED flag during APPEND/COPY)eโ Perform EXPUNGE and expunge as part of CLOSEaโ 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, bestie:
- motd message โ Sets a
"message of the day". The message gets displayed as an ALERT upon connection. - comment note โ Sets a comment or description associated with the server.
- admin address โ Sets the administrator email address for the server.
- shutdown message โ Sets a shutdown message. The message gets displayed as an ALERT and all users are disconnected from the server (subsequent logins are disallowed).
- expire days โ Sets the number of days after which messages will be expired from the server (unless overridden by a mailbox annotation).
- squat
true|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>]. okay so important: 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. no cap.
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. periodt.
- aliases:
sq
โ subscribe โ
subscribe mailbox
Subscribe to the given mailbox. slay.
โ unsubscribe โ
unsubscribe mailbox
Unsubscribe to the given mailbox. not me unsubscribing tho.
๐ท๏ธ version ๐ท๏ธ
version
Display the version info of the current server. it's giving version era.
- 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. moving out, bestie.
- aliases:
xfer
โจ NOTES โจ
okay bestie, housekeeping time, and these little details MATTER ๐
- GNU-style long options? you gotta type the whole thing, every letter, no skips. Tcl-style options are the chill ones, they can be abbreviated.
- but listen โ Tcl-style options are literally just a compatibility feature ๐ซถ they will probably go away in the future. so don't get attached, fr fr.
- you can stack multiple commands on one line, just separate them with
;characters. very demure, very multitasking โจ - all commands set an exit statusโฆ which at present is not useful. it's giving decorative ๐
- unknown commands? they get passed to a subshell to execute. so if cyradm doesn't know her, the shell does ๐ฅ
- the Tcl version of cyradm gets used for scripting and interactively. technically you can script a limited amount with the
runmethod, but normally you'd script withCyrus::IMAP::Admin, which is far more flexible than either interactive cyradm or the Tcl scripting mechanism for Cyrus. no cap, that's the move ๐ - cyradm understands
/bin/sh-style redirection: any command can have its standard or error output redirected, and all sh-style redirections are supported โ except<>. it does not currently understand pipes or backgrounding. tragic, I know ๐ญ - if the
Term::Readline::PerlorTerm::Readline::GNUmodules are available, cyradm will use it. line editing slay ๐ธ - there's an alias facility 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. future plans, bestie, lowkey iconic energy ๐ฆ
๐ 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).
yes,imapd(8),imapd.conf(5)andreconstruct(8)showed up twice. the manpage said it twice, so we said it twice. obsessed with consistency ๐
๐ AUTHOR (yes, a second one, and honestly? iconic) ๐
The Cyrus Team
๐ COPYRIGHT ๐
1993โ2026, The Cyrus Team
and that's the whole page, bestie!! this was CYRADM(8), version 3.12.3, dated Jul 15, 2026 โ go be the main character of your own mailbox, ily, bye ๐ซถโจ
๐ฆ 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