summaryrefslogtreecommitdiff
path: root/doc/kolab.1
blob: a768716c73382834d76de55f5cb9aff676b04e3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
.TH kolab 1 "November 4, 2012" "pykolab 0.6" "USER COMMANDS"

.SH NAME
kolab \- command-line utility to interact with Kolab Groupware and Cyrus IMAP

.\"
.\"
.\" SYNOPSIS Section
.\"
.\"
.SH SYNOPSIS
.BI "kolab [-c " "config-file" "] [-d " "debug-level" "] [-l " "log-level" "] [--logfile " "log-file" "] "
.RB "[group] " "command " "[options] [parameters]"

.\"
.\"
.\" DESCRIPTION Section
.\"
.\"
.SH DESCRIPTION
Kolab Groupware command-line utilities that make rain go away.
.PP
The
.BR kolab (1)
utilities are of an administrative nature, meaning that actions will be executed with the highest level of privileges available. For example, listing the mailboxes a user is subscribed to logs on to IMAP as the Cyrus IMAP administrator (configured in the [cyrus-imap] section of
.BR kolab.conf (5)),
and authorize itself as the user before issuing the LSUB command.

.\"
.\"
.\" OPTIONS Section
.\"
.\"
.SH OPTIONS

.TP
.BI "-c " "config-file"

Use
.I config-file
instead of the system-wide configuration file
.IR /etc/kolab/kolab.conf .

.TP
.BI "-d " "debug-level"

Set the debug level to
.IR debug-level .
The default is 0.
.HP
.RS
Trace
.BR kolab (1)
itself with debug level 8.
The maximum debug level of 9 will cause
.BR kolab (1)
to perform protocol tracing (on IMAP, HTTP, LDAP, SMTP, LMTP, MANAGESIEVE and other protocols it uses).
.RE

.TP
.BI "-h, --help"

Display a short help on usage, including commands and a brief description for each.

.TP
.BI "-l, --loglevel " "log-level"

Set the
.BR kolab (1)
log level to
.I log-level
Valid log-levels include DEBUG, INFO, WARN, ERR, CRIT, EMERG.
.HP
.RS
.BR NOTE :
Setting the debug level to non-zero implies setting a log level of DEBUG.
.RE

.TP
.BI "-q, --quiet"

Be quiet \- suppresses output like headers for columns

.TP
.BI "-y, --yes"

Answer yes to all questions (that ask for confirmation).

.\"
.\"
.\" FILES Section
.\"
.\"
.SH FILES
.I /etc/kolab/kolab.conf

.RS
The system wide configuration file for Kolab Groupware. See
.BR kolab.conf (5)
for further details.
.RE

.\"
.\"
.\" ENVIRONMENT Section
.\"
.\"
.SH ENVIRONMENT
No environment variables impact the operations of
.BR kolab (1).

.\"
.\"
.\" COMMANDS Section
.\"
.\"
.SH COMMANDS

.TP
.BI "acl-cleanup " "aci-subject"

Clean up ACLs on mailboxes and mailfolders that refer to the ACI subject
.I aci-subject
in any of the ACEs.

.\" .TP
.\" .BI "add-domain "
.\" Add a domain name space
.\"
.\" .TP
.\" .BI "add-group "
.\" Add a group
.\"
.\" .TP
.\" .BI "add-user "
.\" Add a user
.\"
.TP
.BI "add-user-subscription " "user pattern"

Subscribe
.I user
to the mailboxes matching
.IR pattern .
See PATTERNS for more information on pattern matching.

.TP
.BI "cm, create-mailbox [" "--metadata=path,value" "] " mailbox

Create a mailbox
.I mailbox
[with metadata
.I path
set to
.IR value ].
.PP
.RS
Valid metadata paths depend on the deployment. Metadata paths are prefixed by a METADATA namespace. See EXAMPLES for usage examples.
.RE

.TP
.BI "dam, delete-mailbox-acl " "pattern aci-subject"

Delete ACEs for
.I aci-subject
from mailboxes matching
.IR pattern .
See PATTERNS for more information on pattern matching.

.\" .TP
.\" .BI "delete-domain"
.\" Delete a domain
.\"
.\" .TP
.\" .BI "delete-group"
.\" Delete a group
.\"
.TP
.BI "dm, delete-mailbox " "pattern"

Delete mailboxes matching
.IR pattern .
See PATTERNS for more information on pattern matching.

.\" .TP
.\" .BI "delete-user"
.\" Delete a user
.\"
.\" .TP
.\" .BI "export-mailbox"
.\" Export a mailbox.
.\"
.TP
.BI help

Show a list of commands implemented with
.BR kolab (1).

.TP
.BI "lam, list-mailbox-acls " "pattern"

List the ACEs on mailboxes [matching
.IR pattern ].
See PATTERNS for more information on pattern matching.

.TP
.BI "list-deleted-mailboxes " "pattern"

List mailboxes matching
.IR pattern ,
that have been deleted.
See PATTERNS for more information on pattern matching.

.\" .TP
.\" .BI "list-domains"
.\" List domain name spaces
.\"
.\" .TP
.\" .BI "list-groups"
.\" List groups
.\"
.TP
.BI "list-mailbox-metadata " "pattern"

List METADATA on mailboxes matching
.IR pattern .
See PATTERNS for more information on pattern matching.

.TP
.BI "lm, list-mailboxes " "pattern"

List mailboxes [matching
.IR pattern ].
See PATTERNS for more information on pattern matching.

.TP
.BI "lq, list-quota " "pattern"

List quota for mailboxes matching
.IR pattern .
See PATTERNS for more information on pattern matching.

.TP
.BI "list-user-subscriptions " "user"

List the mailboxes
.I user
is subscribed to.

.\" .TP
.\" .BI "remove-mail"
.\"
.TP
.BI "remove-user-subscription [" "user " "[" "pattern" "]]"

Unsubscribe user
.I user
from mailboxes matching
.IR pattern .
See PATTERNS for more information on pattern matching.

.TP
.BI "rename-mailbox " "old-mailbox new-mailbox"

Rename
.IR "old-mailbox " "to " "new-mailbox" "."

.\" .TP
.\" .BI "role-info"
.\"
.TP
.BI "sam, set-mailbox-acl " "pattern aci-subject access-rights"

Set the ACE for ACI subject
.I aci-subject
on mailboxes matching
.I pattern
to
.IR access-rights .
.PP
.RS
Should an ACE for
.I aci-subject
already exist, then its permissions are set to
.IR access-rights .
Should no ACE for
.I aci-subject
exist, then it is added with access rights
.IR access-rights .
.RE

.TP
.BI "set-language " "user " "[" "language" "]"

Set the language for user
.I user
[to
.IR language ].
.PP
.RS
.I language
should be a language identifier such as 'en_US', or 'de_CH'.
Omit the
.I language
parameter to retrieve a list of languages configured to be associated with the user type in the Kolab Web Administration Panel.
.PP
.BR NOTE :
The language associated with a user impacts the transliteration of their name components in to mail, alias, uid and other 7-bit ascii attributes. To see the full effect before applying this setting, use the Kolab Web Administration Panel.
.RE

.\" .TP
.\" .BI "set-mail"
.\"
.\" .TP
.\" .BI "set-mailbox-metadata"
.\"
.\" .TP
.\" .BI "sq, set-quota"
.\"
.\" .TP
.\" .BI "sync"
.\"
.TP
.BI "transfer-mailbox " "mailbox imap-server"

Manually transfer
.I mailbox
to IMAP server
.IR imap-server .
.PP
.RS
In a Cyrus IMAP Murder environment, using LDAP attribute value 'mailHost', transfers a mailbox from one IMAP server to another IMAP server. The client that runs
.BR kolab (1)
MUST be able to connect to the current IMAP backend server in order for the transfer to succeed.
.PP
.BR NOTE :
In default Kolab Groupware deployments, the mailHost LDAP attribute will need to match the IMAP server FQDN the user's INBOX resides on. This command does not update the mailHost LDAP attribute value.
.PP
This command can be used to move a sub-folder to a different server (note that a separate quota root may need to be created), or to correct an environment out-of-sync.
.RE

.TP
.BI "undelete-mailbox " "mailbox " "[" "target-mailbox" "]"

Undelete mailbox
.I mailbox
[to target mailbox
.IR target-mailbox ].
.PP
.RS
Undeletes (restores) the previously deleted mailbox
.I mailbox
(if
.B delete_mode
is set to
.I delayed
in
.BR imapd.conf (5)).
If
.I target-mailbox
is specified, uses
.I target-mailbox
as the root folder to restore the previously deleted mailbox to.
Otherwise, restores the mailbox
.I mailbox
to its original location (from which it was deleted).
.RE

.\" .TP
.\" .BI "user-info"
.\"
.SS SIEVE COMMANDS
.BR kolab (1)
includes a set of sub-commands for Sieve script management.

.TP
.BI "list " "user"

List the Sieve scripts for user
.IR user .
.PP
.RS
Lists the names of the Sieve scripts for user
.IR user ,
and indicates which script is activated (the script that is executed on LMTP mail delivery to the user's mailbox).
.PP
.BR NOTE :
This script does NOT check the syntax of each script, nor does it determine which scripts reside in the user's personal Sieve namespace but are not active AND not included in any other script. See the
.BR "kolab" "(1) " "sieve test"
.I user
command to get that information.
.RE

.TP
.BI "put " "user script-file " "[" "script-name" "]"

Add a new Sieve script with contents
.I script-file
under title
.I script-name
for user
.IR user .
If
.I script-name
is not specified, the basename of
.I script-file
is used.

.TP
.BI "refresh " "user"

Refresh the Sieve scripts for user
.IR user ,
using the Sieve script management conventions outlined in Kolab Enhancement Proposal #14 (https://wiki.kolab.org/KEP:14).

.TP
.BI "test " "user"

Test the Sieve scripts for user
.IR user .

.SS PATTERNS
Patterns matching mailboxes currently accept two wildcard types:

.TP
.B "%"
.PP
.RS
Used to match one level of folders.
.RE

.TP
.B "*"
.PP
.RS
Used to match all (sub-)levels of folders.
.RE

.SH EXAMPLES

.TP
Subscribe user john.doe@example.org to all mailboxes in the shared namespace:

.B kolab add-user-subscription john.doe@example.org shared/*@example.org

.TP
Create a new calendar folder "Private Calendar" for user john.doe@example.org:

.B kolab create-mailbox --metadata=/shared/vendor/kolab/folder-type,event 'user/john.doe/Private Calendar@example.org'
.PP
.RS
.BR NOTE :
The
.I mailbox
command-line parameter 'user/john.doe/Private Calendar@example.org' needs to be quoted, as it contains a space character.

.BR NOTE :
Setting folder metadata should adhere to RFC standards and, for Kolab Groupware deployments, Kolab Enhancement Proposal #17 (https://wiki.kolab.org/KEP:17).

For any given deployment, valid custom metadata paths are listed in
.BR /etc/imapd.annotations.conf .
.RE

.HP
List top-level user mailboxes for the example.org authorization realm:

.B "kolab list-mailboxes user/%@example.org"

.HP
List top-level mailboxes outside any particular authorization realm:

.B "kolab list-mailboxes user/%"

.HP
List mailboxes for user john.doe@example.org:

.B "kolab list-mailboxes user/john.doe/*@example.org"
.PP
.RS
.BR NOTE :
The mailbox user/john.doe@example.org itself is not included in the output for this example command.
.RE

.SH DIAGNOSTICS

.SH ADDITIONAL READING

Additional documentation for Kolab Groupware is available on https://docs.kolab.org

.SH BUGS

You are kindly requested to log bugs against
.B pykolab
in https://issues.kolab.org

.SH AUTHOR

Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>

.SH SEE ALSO

.BR kolab.conf (5),