|
NAMECyrus::IMAP::Shell - Perl version of cyradmSYNOPSIS$ cyradm [--user authid] [--authz authzid] [--[no]rc] [--systemrc file] [--userrc file] \ > [--port n] [--auth mechanism] [--server] server but possibly $ perl -MCyrus::IMAP::Shell -e 'run("myscript")' or even (not recommended) use Cyrus::IMAP::Admin::Shell; run('myscriptname'); DESCRIPTIONThis module implements cyradm in Perl. It is a shell around Cyrus::IMAP::Admin. Commands are provided in both Tcl-compatible forms and GNU-style long option forms.The ``cyradm`` utility is a simple command line for performing common administrative tasks on a Cyrus IMAP server, written in Perl. The cyradm utility can either be executed from a client where it has been installed and connect to the server via IMAP or it can be executed locally via a shell on the server. cyradm understands /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. If the Term::Readline::Perl or Term::Readline::GNU modules are available, cyradm will use it. COMMAND-LINE ARGUMENTS
COMMANDSauthenticateauthenticate ["--minssf" N] ["--maxssf" N] ["--mechanisms" list] ["--service" name] ["--tlskey" keyfile] ["--notls"] ["--cafile" cacertfile] ["--capath" cacertdir] userAuthenticate 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. aliases: "auth", "login" chdirchdir directoryChange directory. A "pwd" builtin is not provided, but the default command action will run "pwd" from a shell if invoked. aliases: "cd" createmailboxcreatemailbox ["--partition" partition] ["--specialuse" specialuse] mailboxcreatemailbox ["--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.
aliases: "cm", "create" deleteaclmailboxdeleteaclmailbox mailbox id [...]Remove ACLs from the specified mailbox. aliases: "delteacl", "dam" deletemailboxdeletemailbox mailboxDelete 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. Note that the online help admits to an optional host argument. This argument is not currently used, and will be rejected with an error if specified; it is reserved for IMSP. aliases: "delete", "dm" disconnectdisconnectDisconnect from the current server. The prompt will revert to "cyradm>". This does not quit cyradm. aliases: "disc" exitexit [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" helphelp [command]Show help for "command" or all commands. aliases: "?" getmetadatagetmetadata [mailbox]Display mailbox/server metadata aliases: "getmd" infoinfo [mailbox]Display the mailbox/server annotations. listaclmailboxlistaclmailbox mailboxList ACLs on the specified mailbox. aliases: "lam", "listacl" listmailboxlistmailbox ["--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. 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. aliases: "list", "lm" listquotalistquota rootList 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" listquotarootlistquotaroot mailboxShow quota roots and quotas for mailbox aliases: "lqm", "lqr" mboxconfigmboxconfig ["--private"] mailbox attribute valueSet 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:
aliases: "mboxcfg" reconstructreconstruct ["-r"] mailboxReconstruct the specified mailbox, optionally recursing and reconstructing child mailboxes if the "-r" flag is given. For more information see reconstruct(8). renamemailboxrenamemailbox ["--partition" partition] oldname newnamerenamemailbox 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. aliases: "rename", "renm" serverserverserver [--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.) 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" setaclmailboxsetaclmailbox 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:
aliases: "setacl", "sam" setinfosetinfo attribute valueSet server metadata. A value of "none" will remove the attribute. The currently supported attributes are:
setmetadatasetmetadata [--private] mailbox [annotation] valueSet 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" setquotasetquota 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" subscribesubscribe mailboxSubscribe to the given mailbox. unsubscribeunsubscribe mailboxUnsubscribe to the given mailbox. versionversionDisplay the version info of the current server. aliases: "ver" xfermailboxxfermailbox ["--partition" partition] mailbox serverxfermailbox 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. aliases: "xfer" NOTESGNU-style long options must be given in their entirety; Tcl-style options may be abbreviated.Tcl-style options are provided as a compatibility feature. They will probably go away in the future. Multiple commands can be given on a line, separated by ';' characters. All commands set an exit status, which at present is not useful. Unknown commands are passed to a subshell for execution. The Tcl version of cyradm is used for scripting as well as interactively. While this is possible to a limited extent by use of the "run" method, 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. cyradm understands /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. If the "Term::Readline::Perl" or "Term::Readline::GNU" modules are available, cyradm will 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. AUTHORBrandon S. Allbery, allbery@ece.cmu.eduSEE ALSOCyrus::IMAP::Admin, Term::ReadLine, sh(1), perl(1), imapd(8), imapd.conf(5), reconstruct(8)
Visit the GSP FreeBSD Man Page Interface. |