CYR_DBTOOL(8) | Cyrus IMAP | CYR_DBTOOL(8) |
cyr_dbtool - Cyrus IMAP documentation
Manage Cyrus databases
cyr_dbtool [ -C config-file ] [ -M ] [ -n ] [ -o ] [ -T ]
db-file db-backend action [ key ] [ value ]
cyr_dbtool is used to manage a cyrusdb file. The usable actions are:
get <key>
set <key> <value>
delete <key>
consistency
repack
You may omit key or key/value and specify one per line on stdin. Keys are terminated by tab or newline, values are terminated by newline.
Running without any options will list the available database backends and usable actions.
The consistency action runs a consistency check on the DB by calling 'myconsistent' on it.
The repack action will compress the database by removing stale data on backends which support it. It's a NOOP otherwise.
cyr_dbtool reads its configuration options out of the imapd.conf(5) file unless specified otherwise by -C.
NOTE:
TIP:
This series of examples address manipulating the user_deny.db database, which is used to deny users access to specific services. This is typically a Cyrus "flat" format database.
user_deny.db is indexed by userid and each record contains the database version number (currently 2), a list of "wildmat" patterns specifying Cyrus services to be denied, and a text message to be displayed to the user upon denial. The service names to be matched are those as used in cyrus.conf(5). cyr_deny(8) provides more convenient way to manage user_deny.db.
NOTE:
cyr_dbtool /var/lib/imap/user_deny.db flat baduser "2<tab>pop3,imap<tab>Denied"
cyr_dbtool /var/lib/imap/user_deny.db flat show
cyr_dbtool /var/lib/imap/user_deny.db flat get baduser
/etc/imapd.conf
The Cyrus Team, Nic Bernstein (Onlight), Jeroen van Meeuwen (Kolab Systems)
1993-2018, The Cyrus Team
March 9, 2021 | 3.2.6 |