1CYRADM(1)             User Contributed Perl Documentation            CYRADM(1)
2
3
4

NAME

6       cyradm - Cyrus administration shell, alter ego of Cyrus::IMAP::Shell
7

SYNOPSIS

9         $ cyradm [--user user] [--[no]rc] [--systemrc file] [--userrc file] \
10         > [--port n] [--auth mechanism] [--tlskey keyfile] [--notls] \
11         > [--cafile cacertfile] [--cadir cacertdir] \
12         > [--server] server
13
14       but possibly
15
16         $ perl -MCyrus::IMAP::Shell -e 'run("myscript")'
17
18       or even (not recommended)
19
20         use Cyrus::IMAP::Admin::Shell;
21
22         run('myscriptname');
23

DESCRIPTION

25       This module implements cyradm in Perl.  It is a shell around
26       Cyrus::IMAP::Admin.  Commands are provided in both Tcl-compatible forms
27       and GNU-style long option forms.
28

COMMANDS

30       "authenticate" ["--minssf" N] ["--maxssf" N] ["--mechanisms" list]
31       ["--service" name] ["--tlskey" keyfile] ["--notls"] ["--cafile"
32       cacertfile] ["--capath" cacertdir] [user]
33       "auth" ["--minssf" N] ["--maxssf" N] ["--mechanisms" list] ["--service"
34       name] ["--tlskey" keyfile] ["--notls"] ["--cafile" cacertfile]
35       ["--capath" cacertdir] [user]
36       "login" ["--minssf" N] ["--maxssf" N] ["--mechanisms" list]
37       ["--service" name] ["--tlskey" keyfile] ["--notls"] ["--cafile"
38       cacertfile] ["--capath" cacertdir] [user]
39           Authenticate to server.  You must already be connected to a server
40           and Cyrus imapd will refuse to allow you to re-authenticate once
41           you have authenticated once.
42
43       "chdir" directory
44       "cd" directory
45           Change directory.  A "pwd" builtin is not provided, but the default
46           command action will run "pwd" from a shell if invoked.
47
48       "createmailbox" ["--partition" partition] ["--specialuse" specialuse]
49       mailbox
50       "create" ["--partition" partition] ["--specialuse" specialuse] mailbox
51       "create" ["--specialuse" specialuse] mailbox partition
52       "cm" ["--partition" partition] ["--specialuse" specialuse] mailbox
53       "cm" ["--specialuse" specialuse] mailbox partition
54           Create a mailbox on the default or a specified partition.  Both
55           old-style and getopt-style usages are accepted (combining them will
56           produce an error).  Optionally assign a special use to the mailbox.
57
58       "deleteaclmailbox" mailbox id [...]
59       "deleteacl" mailbox id [...]
60       "dam" mailbox id [...]
61           Remove ACLs from the specified mailbox.
62
63       "deletemailbox" mailbox
64       "delete" mailbox
65       "dm" mailbox
66           Delete the specified mailbox.
67
68           Administrators do not have implicit delete rights on mailboxes.
69           Use the setaclmailbox command to grant the "x" permission to your
70           principal if you need to delete a mailbox you do not own.
71
72       "disconnect"
73       "disc"
74           Disconnect from the current server.  The prompt will revert to
75           "cyradm>".
76
77       "exit" [number]
78       "quit" [number]
79           Exit cyradm, optionally with a specific exit status; the exit
80           status of the last command will be used if one is not specified.
81
82       help [command]
83       ? [command]
84           Show help for "command" or all commands.
85
86       "getmetadata" [mailbox]
87       "getmd" [mailbox]
88           Display mailbox/server metadata
89
90       "info" [mailbox]
91           Display the mailbox/server annotations.
92
93       "listaclmailbox" mailbox
94       "listacl" mailbox
95       "lam" mailbox
96           List ACLs on the specified mailbox.
97
98       "listmailbox" ["--subscribed"] ["--specialuse"] [pattern [reference]]
99       "list" ["--subscribed"] ["--specialuse"] [pattern [reference]]
100       "lm" ["--subscribed"] ["--specialuse"] [pattern [reference]]
101           List all, or all subscribed or special-use, mailboxes matching the
102           specified pattern.  The pattern may have embedded wildcards '*' or
103           '%', which match anything or anything except the separator
104           character, respectively.
105
106           Mailboxes returned will be relative to the specified reference if
107           one is specified.  This allows a mailbox list to be limited to a
108           particular hierarchy.
109
110           In some cases when the '%' wildcard is used to end a pattern, it
111           may match an entry which is not a mailbox but which contains other
112           mailboxes.  In this case, the entry will be parenthesized to
113           indicate that it is a root for other mailboxes, as opposed to a
114           mailbox itself.
115
116       "listquota" root
117       "lq" root
118           List quotas on specified root.  If the specified mailbox path does
119           not have a quota assigned, an error will be raised; see
120           listquotaroot for a way to find the quota root for a mailbox.
121
122       "listquotaroot" mailbox
123       "lqm" mailbox
124       "lqr" mailbox?
125           show quota roots and quotas for mailbox
126
127       "mboxconfig" ["--private"] mailbox attribute value
128       "mboxcfg" ["--private"] mailbox attribute value
129           Set mailbox metadata, optionally set the private instead of the
130           shared version of the metadata. A value of "none" will remove the
131           attribute.
132
133           The currently supported attributes are:
134
135           "comment"
136               Sets a comment or description associated with the mailbox.
137
138           "expire"
139               Sets the number of days after which messages will be expired
140               from the mailbox.
141
142           "news2mail"
143               Sets an email address to which messages injected into the
144               server via NNTP will be sent.
145
146           "pop3showafter"
147               Sets a time (in RFC3501 format, for example "6-Jan-2011
148               11:45:32 +1100") which specifies a cutoff date such that POP3
149               fetching of the folder does not see messages whose internaldate
150               is before or equal to the date.
151
152           "sharedseen"
153               Enables the use of a shared \Seen flag on messages rather than
154               a per-user \Seen flag.  The 's' right in the mailbox ACL still
155               controls whether a user can set the shared \Seen flag.
156
157           "sieve"
158               Indicates the name of the global sieve script that should be
159               run when a message is delivered to the shared mailbox (not used
160               for personal mailboxes).
161
162           "squat"
163               Indicates that the mailbox should have a squat index created
164               for it.
165
166           "/explicit/annotation"
167               Sets the annotation /explicit/annotation on mailbox to value.
168
169       "renamemailbox" ["--partition" partition] oldname newname
170       "rename" ["--partition" partition] oldname newname
171       "renm" ["--partition" partition] oldname newname
172       "renamemailbox" oldname newname [partition]
173       "rename" oldname newname [partition]
174       "renm" oldname newname [partition]
175           Rename the specified mailbox, optionally moving it to a different
176           partition.  Both old-style and getopt-style usages are accepted;
177           combining them will produce an error.
178
179       server [--noauthenticate] [server]
180       connect [--noauthenticate] [server]
181       servername [--noauthenticate] [server]
182           With no arguments, show the current server.  With an argument,
183           connect to that server.  It will prompt for automatic login unless
184           the "--noauthenticate" option is specified.  (This may change; in
185           particular, either automatic authentication will be removed or all
186           "authenticate" options will be added.)
187
188           When connected to a server, the cyradm prompt changes from
189           "cyradm>" to "servername>", where servername is the fully qualified
190           domain name of the connected server.
191
192       "setaclmailbox" mailbox id rights [id rights ...]
193       "setacl" mailbox id rights [id rights ...]
194       "sam" mailbox id rights [id rights ...]
195           Set ACLs on a mailbox.  The ACL may be one of the special strings
196           "none", "read" ("lrs"), "post" ("lrsp"), "append" ("lrsip"),
197           "write" ("lrswipkxten"), "delete" ("lrxten"), or "all"
198           ("lrswipkxten"), or any combinations of the ACL codes:
199
200           l   Lookup (mailbox is visible to LIST/LSUB, SUBSCRIBE mailbox)
201
202           r   Read (SELECT/EXAMINE the mailbox, perform STATUS)
203
204           s   Seen (set/clear \SEEN flag via STORE, also set \SEEN flag
205               during
206                   APPEND/COPY/FETCH BODY[...])
207
208           w   Write flags other than \SEEN and \DELETED
209
210           i   Insert (APPEND, COPY destination)
211
212           p   Post (send mail to mailbox)
213
214           k   Create mailbox (CREATE new sub-mailboxes, parent for new
215               mailbox in RENAME)
216
217           x   Delete mailbox (DELETE mailbox, old mailbox name in RENAME)
218
219           t   Delete messages (set/clear \DELETED flag via STORE, also set
220               \DELETED
221                   flag during APPEND/COPY)
222
223           e   Perform EXPUNGE and expunge as part of CLOSE
224
225           a   Administer (SETACL/DELETEACL/GETACL/LISTRIGHTS)
226
227           n   Add, delete or modify annotations
228
229       "setinfo" attribute value
230           Set server metadata.  A value of "none" will remove the attribute.
231           The currently supported attributes are:
232
233           "motd"
234               Sets a "message of the day".  The message gets displayed as an
235               ALERT after authentication.
236
237           "comment"
238               Sets a comment or description associated with the server.
239
240           "admin"
241               Sets the administrator email address for the server.
242
243           "shutdown"
244               Sets a shutdown message.  The message gets displayed as an
245               ALERT and all users are disconnected from the server
246               (subsequent logins are disallowed).
247
248           "expire"
249               Sets the number of days after which messages will be expired
250               from the server (unless overridden by a mailbox annotation).
251
252           "squat"
253               Indicates that all mailboxes should have a squat indexes
254               created for them (unless overridden by a mailbox annotation).
255
256       "setmetadata" [--private] mailbox [annotation] value
257       "setmd" [--private] mailbox [annotation] value
258           Set metadata on mailbox, where <annotation> is one of
259           [comment|expire|news2mail|pop3showafter|sharedseen|sieve|specialuse|
260           squat|/<explicit annotation>].
261
262           Note that flags with a leading backslash must be escaped with an
263           additional backslash.  For example:
264
265             setmetadata --private Spam specialuse "\\Junk"
266
267           Note, too, that "private" annotations are private to the user
268           currently authenticated as, not necessarily the owner of the
269           mailbox.  To set annotations for another user you must authorize as
270           that user.
271
272           In addition to the use of optional flag --private, one may use a
273           more explicit syntax, prefixing the annotation with '/shared/' or
274           '/private/' as in this example:
275
276             setmetadata Spam /private/specialuse "\\Junk"
277
278       "setquota" root resource value [resource value ...]
279       "sq" root resource value [resource value ...]
280           Set a quota on the specified root, which may or may not be an
281           actual mailbox.  The only resource understood by Cyrus is
282           "STORAGE".  The value may be the special string "none" which will
283           remove the quota.
284
285       "version"
286       "ver"
287           Display the version info of the current server.
288
289       "xfermailbox" ["--partition" partition] mailbox server
290       "xfer" ["--partition" partition] mailbox server
291       "xfermailbox" mailbox server [partition]
292       "xfer" mailbox server [partition]
293           Transfer (relocate) the specified mailbox to a different server.
294           Both old-style and getopt-style usages are accepted; combining them
295           will produce an error.
296

NOTES

298       GNU-style long options must be given in their entirety; Tcl-style
299       options may be abbreviated.
300
301       Tcl-style options are provided as a compatibility feature.  They will
302       probably go away in the future.
303
304       Multiple commands can be given on a line, separated by ';' characters.
305
306       All commands set an exit status, which at present is not useful.
307
308       Unknown commands are passed to a subshell for execution.
309
310       The Tcl version of cyradm is used for scripting as well as
311       interactively.  While this is possible to a limited extent by use of
312       the "run" method, scripting would normally be done with
313       "Cyrus::IMAP::Admin", which is far more flexible than either
314       interactive "cyradm" or the Tcl scripting mechanism for Cyrus.
315
316       cyradm understands /bin/sh-style redirection:  any command can have its
317       standard or error output redirected, with all sh-style redirections
318       (except "<>") supported.  It does not currently understand pipes or
319       backgrounding.
320
321       If the "Term::Readline::Perl" or "Term::Readline::GNU" modules are
322       available, cyradm will use it.
323
324       An alias facility is implemented internally, but no access is currently
325       provided to it.  This will change, if only to allow some of the
326       predefined aliases to be removed if they conflict with useful shell
327       commands.
328

AUTHOR

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

SEE ALSO

333       Cyrus::IMAP::Admin Term::ReadLine sh(1), perl(1), imapd(8).
334
335
336
337perl v5.36.0                      2023-01-22                         CYRADM(1)
Impressum