1CYRADM(1) User Contributed Perl Documentation CYRADM(1)
2
3
4
6 cyradm - Cyrus administration shell, alter ego of Cyrus::IMAP::Shell
7
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
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
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 Note that the online help admits to an optional host argument.
73 This argument is not currently used, and will be rejected with an
74 error if specified; it is reserved for IMSP.
75
76 "disconnect"
77 "disc"
78 Disconnect from the current server. The prompt will revert to
79 "cyradm>".
80
81 "exit" [number]
82 "quit" [number]
83 Exit cyradm, optionally with a specific exit status; the exit
84 status of the last command will be used if one is not specified.
85
86 help [command]
87 ? [command]
88 Show help for "command" or all commands.
89
90 "info" [mailbox]
91 Display the mailbox/server metadata.
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 "setquota" root resource value [resource value ...]
257 "sq" root resource value [resource value ...]
258 Set a quota on the specified root, which may or may not be an
259 actual mailbox. The only resource understood by Cyrus is
260 "STORAGE". The value may be the special string "none" which will
261 remove the quota.
262
263 "version"
264 "ver"
265 Display the version info of the current server.
266
267 "xfermailbox" ["--partition" partition] mailbox server
268 "xfer" ["--partition" partition] mailbox server
269 "xfermailbox" mailbox server [partition]
270 "xfer" mailbox server [partition]
271 Transfer (relocate) the specified mailbox to a different server.
272 Both old-style and getopt-style usages are accepted; combining them
273 will produce an error.
274
276 GNU-style long options must be given in their entirety; Tcl-style
277 options may be abbreviated.
278
279 Tcl-style options are provided as a compatibility feature. They will
280 probably go away in the future.
281
282 Multiple commands can be given on a line, separated by ';' characters.
283
284 All commands set an exit status, which at present is not useful.
285
286 Unknown commands are passed to a subshell for execution.
287
288 The Tcl version of cyradm is used for scripting as well as
289 interactively. While this is possible to a limited extent by use of
290 the "run" method, scripting would normally be done with
291 "Cyrus::IMAP::Admin", which is far more flexible than either
292 interactive "cyradm" or the Tcl scripting mechanism for Cyrus.
293
294 cyradm understands /bin/sh-style redirection: any command can have its
295 standard or error output redirected, with all sh-style redirections
296 (except "<>") supported. It does not currently understand pipes or
297 backgrounding.
298
299 If the "Term::Readline::Perl" or "Term::Readline::GNU" modules are
300 available, cyradm will use it.
301
302 An alias facility is implemented internally, but no access is currently
303 provided to it. This will change, if only to allow some of the
304 predefined aliases to be removed if they conflict with useful shell
305 commands.
306
308 Brandon S. Allbery, allbery@ece.cmu.edu
309
311 Cyrus::IMAP::Admin Term::ReadLine sh(1), perl(1), imapd(8).
312
313
314
315perl v5.30.1 2019-11-22 CYRADM(1)