1IMAP::Shell(3) User Contributed Perl Documentation IMAP::Shell(3)
2
3
4
6 Cyrus::IMAP::Shell - Perl version of cyradm
7
9 $ cyradm [--user authid] [--authz authzid] [--[no]rc] [--systemrc file] [--userrc file] \
10 > [--port n] [--auth mechanism] [--server] server
11
12 but possibly
13
14 $ perl -MCyrus::IMAP::Shell -e 'run("myscript")'
15
16 or even (not recommended)
17
18 use Cyrus::IMAP::Admin::Shell;
19
20 run('myscriptname');
21
23 This module implements cyradm in Perl. It is a shell around
24 Cyrus::IMAP::Admin. Commands are provided in both Tcl-compatible forms
25 and GNU-style long option forms.
26
28 "authenticate" ["--minssf" N] ["--maxssf" N] ["--mechanisms" list]
29 [user]
30 "auth" ["--minssf" N] ["--maxssf" N] ["--mechanisms" list] [user]
31 "login" ["--minssf" N] ["--maxssf" N] ["--mechanisms" list] [user]
32 Authenticate to server. You must already be connected to a server
33 and Cyrus imapd will refuse to allow you to re-authenticate once
34 you have authenticated once.
35
36 "chdir" directory
37 "cd" directory
38 Change directory. A "pwd" builtin is not provided, but the default
39 command action will run "pwd" from a shell if invoked.
40
41 "createmailbox" ["--partition" partition] mailbox
42 "createmailbox" mailbox partition
43 "create" ["--partition" partition] mailbox
44 "create" mailbox partition
45 "cm" ["--partition" partition] mailbox
46 "cm" mailbox partition
47 Create a mailbox on the default or a specified partition. Both
48 old-style and getopt-style usages are accepted (combining them will
49 produce an error).
50
51 "deleteaclmailbox" mailbox id [...]
52 "deleteacl" mailbox id [...]
53 "dam" mailbox id [...]
54 Remove ACLs from the specified mailbox.
55
56 "deletemailbox" mailbox
57 "delete" mailbox
58 "dm" mailbox
59 Delete the specified mailbox.
60
61 Administrators do not have implicit delete rights on mailboxes.
62 Use the setaclmailbox command to grant the "k" permission to your
63 principal if you need to delete a mailbox you do not own.
64
65 Note that the online help admits to an optional host argument.
66 This argument is not currently used, and will be rejected with an
67 error if specified; it is reserved for IMSP.
68
69 "disconnect"
70 "disc"
71 Disconnect from the current server. The prompt will revert to
72 "cyradm>".
73
74 "exit" [number]
75 "quit" [number]
76 Exit cyradm, optionally with a specific exit status; the exit sta‐
77 tus of the last command will be used if one is not specified.
78
79 help [command]
80 ? [command]
81 Show help for "command" or all commands.
82
83 "info" [mailbox]
84 Display the mailbox/server metadata.
85
86 listaclmailbox mailbox
87 listacl mailbox
88 lam mailbox
89 List ACLs on the specified mailbox.
90
91 "listmailbox" ["--subscribed"] [pattern [reference]]
92 "list" ["--subscribed"] [pattern [reference]]
93 "lm" ["--subscribed"] [pattern [reference]]
94 List all, or all subscribed, mailboxes matching the specified pat‐
95 tern. The pattern may have embedded wildcards '*' or '%', which
96 match anything or anything except the separator character, respec‐
97 tively.
98
99 Mailboxes returned will be relative to the specified reference if
100 one is specified. This allows a mailbox list to be limited to a
101 particular hierarchy.
102
103 In some cases when the '%' wildcard is used to end a pattern, it
104 may match an entry which is not a mailbox but which contains other
105 mailboxes. In this case, the entry will be parenthesized to indi‐
106 cate that it is a root for other mailboxes, as opposed to a mailbox
107 itself.
108
109 "listquota" root
110 "lq" root
111 List quotas on specified root. If the specified mailbox path does
112 not have a quota assigned, an error will be raised; see listquota‐
113 root for a way to find the quota root for a mailbox.
114
115 "listquotaroot" mailbox
116 "lqm" mailbox
117 "lqr" mailbox?
118 show quota roots and quotas for mailbox
119
120 "mboxconfig" mailbox attribute value
121 "mboxcfg" mailbox attribute value
122 Set mailbox metadata. A value of "none" will remove the attribute.
123 The currently supported attributes are:
124
125 "comment"
126 Sets a comment or description associated with the mailbox.
127
128 "condstore"
129 Enables the IMAP CONDSTORE extension (modification sequences)
130 on the mailbox.
131
132 "expire"
133 Sets the number of days after which messages will be expired
134 from the mailbox.
135
136 "sieve"
137 Indicates the name of the global sieve script that should be
138 run when a message is delivered to the shared mailbox (not used
139 for personal mailboxes).
140
141 "squat"
142 Indicates that the mailbox should have a squat index created
143 for it.
144
145 "news2mail"
146 Sets an email address to which messages injected into the
147 server via NNTP will be sent.
148
149 "renamemailbox" ["--partition" partition] oldname newname
150 "rename" ["--partition" partition] oldname newname
151 "renm" ["--partition" partition] oldname newname
152 "renamemailbox" oldname newname [partition]
153 "rename" oldname newname [partition]
154 "renm" oldname newname [partition]
155 Rename the specified mailbox, optionally moving it to a different
156 partition. Both old-style and getopt-style usages are accepted;
157 combining them will produce an error.
158
159 server [--noauthenticate] [server]
160 connect [--noauthenticate] [server]
161 servername [--noauthenticate] [server]
162 With no arguments, show the current server. With an argument, con‐
163 nect to that server. It will prompt for automatic login unless the
164 "--noauthenticate" option is specified. (This may change; in par‐
165 ticular, either automatic authentication will be removed or all
166 "authenticate" options will be added.)
167
168 When connected to a server, cyradm's prompt changes from "cyradm>"
169 to "servername>", where servername is the fully qualified domain
170 name of the connected server.
171
172 "setaclmailbox" mailbox id rights [id rights ...]
173 "setacl" mailbox id rights [id rights ...]
174 "sam" mailbox id rights [id rights ...]
175 Set ACLs on a mailbox. The ACL may be one of the special strings
176 "none", "read" ("lrs"), "post" ("lrsp"), "append" ("lrsip"),
177 "write" ("lrswipkxte"), "delete" ("lrxte"), or "all" ("lrswip‐
178 kxte"), or any combinations of the ACL codes:
179
180 l Lookup (mailbox is visible to LIST/LSUB, SUBSCRIBE mailbox)
181
182 r Read (SELECT/EXAMINE the mailbox, perform STATUS)
183
184 s Seen (set/clear \SEEN flag via STORE, also set \SEEN flag dur‐
185 ing
186 APPEND/COPY/FETCH BODY[...])
187
188 w Write flags other than \SEEN and \DELETED
189
190 i Insert (APPEND, COPY destination)
191
192 p Post (send mail to mailbox)
193
194 k Create mailbox (CREATE new sub-mailboxes, parent for new mail‐
195 box in RENAME)
196
197 x Delete mailbox (DELETE mailbox, old mailbox name in RENAME)
198
199 t Delete messages (set/clear \DELETED flag via STORE, also set
200 \DELETED
201 flag during APPEND/COPY)
202
203 e Perform EXPUNGE and expunge as part of CLOSE
204
205 a Administer (SETACL/DELETEACL/GETACL/LISTRIGHTS)
206
207 "setinfo" attribute value
208 Set server metadata. A value of "none" will remove the attribute.
209 The currently supported attributes are:
210
211 "motd"
212 Sets a "message of the day". The message gets displayed as an
213 ALERT after authentication.
214
215 "comment"
216 Sets a comment or description associated with the server.
217
218 "admin"
219 Sets the administrator email address for the server.
220
221 "shutdown"
222 Sets a shutdown message. The message gets displayed as an
223 ALERT and all users are disconnected from the server (subse‐
224 quent logins are disallowed).
225
226 "expire"
227 Sets the number of days after which messages will be expired
228 from the server (unless overridden by a mailbox annotation).
229
230 "squat"
231 Indicates that all mailboxes should have a squat indexes cre‐
232 ated for them (unless overridden by a mailbox annotation).
233
234 "setquota" root resource value [resource value ...]
235 "sq" root resource value [resource value ...]
236 Set a quota on the specified root, which may or may not be an
237 actual mailbox. The only resource understood by Cyrus is "STOR‐
238 AGE". The units are as defined in RFC 2087, groups of 1024 octets
239 (i.e. Kilobytes). The value may be the special string "none" which
240 will remove the quota.
241
242 "version"
243 "ver"
244 Display the version info of the current server.
245
246 "xfermailbox" ["--partition" partition] mailbox server
247 "xfer" ["--partition" partition] mailbox server
248 "xfermailbox" mailbox server [partition]
249 "xfer" mailbox server [partition]
250 Transfer (relocate) the specified mailbox to a different server.
251 Both old-style and getopt-style usages are accepted; combining them
252 will produce an error.
253
255 GNU-style long options must be given in their entirety; Tcl-style
256 options may be abbreviated.
257
258 Tcl-style options are provided as a compatibility feature. They will
259 probably go away in the future.
260
261 Multiple commands can be given on a line, separated by ';' characters.
262
263 All commands set an exit status, which at present is not useful.
264
265 Unknown commands are passed to a subshell for execution.
266
267 The Tcl version of cyradm is used for scripting as well as interac‐
268 tively. While this is possible to a limited extent by use of the "run"
269 method, scripting would normally be done with "Cyrus::IMAP::Admin",
270 which is far more flexible than either interactive "cyradm" or the Tcl
271 scripting mechanism for Cyrus.
272
273 cyradm understands /bin/sh-style redirection: any command can have its
274 standard or error output redirected, with all sh-style redirections
275 (except "<>") supported. It does not currently understand pipes or
276 backgrounding.
277
278 If the "Term::Readline::Perl" or "Term::Readline::GNU" modules are
279 available, cyradm will use it.
280
281 An alias facility is implemented internally, but no access is currently
282 provided to it. This will change, if only to allow some of the prede‐
283 fined aliases to be removed if they conflict with useful shell com‐
284 mands.
285
287 Brandon S. Allbery, allbery@ece.cmu.edu
288
290 Cyrus::IMAP::Admin Term::ReadLine sh(1), perl(1), imapd(8).
291
292
293
294perl v5.8.8 2006-11-30 IMAP::Shell(3)