1CYR_DBTOOL(8)                     Cyrus IMAP                     CYR_DBTOOL(8)
2
3
4

NAME

6       cyr_dbtool - Cyrus IMAP documentation
7
8       Manage Cyrus databases
9

SYNOPSIS

11       cyr_dbtool [ -C config-file ] [ -M ] [ -n ] [ -o ] [ -T ]
12               db-file db-backend action [ key ] [ value ]
13

DESCRIPTION

15       cyr_dbtool is used to manage a cyrusdb file. The usable actions are:
16          show [<prefix>]
17
18          get <key>
19
20          set <key> <value>
21
22          delete <key>
23
24          consistency
25
26          repack
27
28       You  may omit key or key/value and specify one per line on stdin.  Keys
29       are terminated by tab or newline, values are terminated by newline.
30
31       Running without any options will list the available  database  backends
32       and usable actions.
33
34       The  consistency  action  runs a consistency check on the DB by calling
35       'myconsistent' on it.
36
37       The repack action will compress the database by removing stale data  on
38       backends which support it.  It's a NOOP otherwise.
39
40       cyr_dbtool  reads  its  configuration  options out of the imapd.conf(5)
41       file unless specified otherwise by -C.
42
43       NOTE:
44          Note that the file locations are NOT read out of  the  configuration
45          file, and must be supplied on the command line.
46
47       TIP:
48          The format of all Cyrus databases is detailed in the distribution in
49          file doc/internal/database-formats.html.  Please  consult  that  for
50          details.
51

OPTIONS

53       -C config-file
54              Use the specified configuration file config-file rather than the
55              default imapd.conf(5).
56
57       -M     Uses improved MBOX list sort
58
59       -n     Create the database file if it doesn't already exist.
60
61       -o     Store all the output in memory and only print it once the trans‐
62              action is completed.
63
64       -T     Use  a transaction to do the action (most especially for 'show')
65              - the default used to be transactions.
66

EXAMPLES

68       This series of examples address manipulating the user_deny.db database,
69       which is used to deny users access to specific services.  This is typi‐
70       cally a Cyrus "flat" format database.
71
72       user_deny.db is indexed by userid and each record contains the database
73       version  number  (currently 2), a list of "wildmat" patterns specifying
74       Cyrus services to be denied, and a text message to be displayed to  the
75       user  upon denial. The service names to be matched are those as used in
76       cyrus.conf(5).  cyr_deny(8) provides  more  convenient  way  to  manage
77       user_deny.db.
78
79       NOTE:
80          Given  that  keys are tab-delimited, these examples use the notation
81          <tab> to indicate the tab character.  When  entering  this  via  the
82          command  line,  remember to escape tabs.  In a normal shell, one can
83          do so with <ctrl-v> (^v).  The  sequence  "<ctrl-v><ctrl-i>"  (^v^i)
84          works well to enter tab characters.
85
86       cyr_dbtool /var/lib/imap/user_deny.db flat baduser "2<tab>pop3,imap<tab>Denied"
87          Deny the user 'baduser' access to imap and pop3.
88
89       cyr_dbtool /var/lib/imap/user_deny.db flat show
90          Show all current database records.
91
92       cyr_dbtool /var/lib/imap/user_deny.db flat get baduser
93          Get the current database record(s) for user 'baduser'.
94

FILES

96       /etc/imapd.conf
97

SEE ALSO

99       imapd.conf(5)
100

AUTHOR

102       The Cyrus Team, Nic Bernstein (Onlight), Jeroen van Meeuwen (Kolab Sys‐
103       tems)
104
106       1993-2018, The Cyrus Team
107
108
109
110
1113.2.4                          October 05, 2020                  CYR_DBTOOL(8)
Impressum