.\" Man page generated from reStructuredText. . .TH "CYR_DBTOOL" "8" "Sep 11, 2023" "3.8.1" "Cyrus IMAP" .SH NAME cyr_dbtool \- Cyrus IMAP documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .sp Manage Cyrus databases .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C \fBcyr_dbtool\fP [ \fB\-C\fP \fIconfig\-file\fP ] [ \fB\-M\fP ] [ \fB\-n\fP ] [ \fB\-o\fP ] [ \fB\-T\fP ] \fIdb\-file\fP \fIdb\-backend\fP \fIaction\fP [ \fIkey\fP ] [ \fIvalue\fP ] .ft P .fi .UNINDENT .UNINDENT .SH DESCRIPTION .sp \fBcyr_dbtool\fP is used to manage a cyrusdb file. The usable actions are: .INDENT 0.0 .INDENT 3.5 \fBshow\fP \fI[]\fP .sp \fBget\fP \fI\fP .sp \fBset\fP \fI \fP .sp \fBdelete\fP \fI\fP .sp \fBconsistency\fP .sp \fBrepack\fP .UNINDENT .UNINDENT .sp You may omit \fIkey\fP or \fIkey/value\fP and specify one per line on stdin. Keys are terminated by tab or newline, values are terminated by newline. .sp Running without any options will list the available database backends and usable actions. .sp The \fIconsistency\fP action runs a consistency check on the DB by calling \(aqmyconsistent\(aq on it. .sp The \fIrepack\fP action will compress the database by removing stale data on backends which support it. It\(aqs a NOOP otherwise. .sp \fBcyr_dbtool\fP reads its configuration options out of the imapd.conf(5) file unless specified otherwise by \fB\-C\fP\&. .sp \fBNOTE:\fP .INDENT 0.0 .INDENT 3.5 Note that the file locations are NOT read out of the configuration file, and must be supplied on the command line. .UNINDENT .UNINDENT .sp \fBTIP:\fP .INDENT 0.0 .INDENT 3.5 The format of all Cyrus databases is detailed in the distribution in file doc/internal/database\-formats.html. Please consult that for details. .UNINDENT .UNINDENT .SH OPTIONS .INDENT 0.0 .TP .B \-C config\-file Use the specified configuration file \fIconfig\-file\fP rather than the default imapd.conf(5)\&. .UNINDENT .INDENT 0.0 .TP .B \-M, \-\-improved\-mboxlist\-sort Uses improved MBOX list sort .UNINDENT .INDENT 0.0 .TP .B \-n, \-\-create Create the database file if it doesn\(aqt already exist. .UNINDENT .INDENT 0.0 .TP .B \-T, \-\-use\-transaction Use a transaction to do the action (most especially for \(aqshow\(aq) \- the default used to be transactions. .UNINDENT .SH EXAMPLES .sp This series of examples address manipulating the \fIuser_deny.db\fP database, which is used to deny users access to specific services. This is typically a Cyrus "flat" format database. .sp \fIuser_deny.db\fP 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 \fIuser_deny.db\fP\&. .sp \fBNOTE:\fP .INDENT 0.0 .INDENT 3.5 Given that \fIkeys\fP are tab\-delimited, these examples use the notation to indicate the tab character. When entering this via the command line, remember to escape tabs. In a normal shell, one can do so with (^v). The sequence "" (^v^i) works well to enter tab characters. .UNINDENT .UNINDENT .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C \fBcyr_dbtool\fP /var/lib/imap/user_deny.db flat baduser "2pop3,imapDenied" .ft P .fi .UNINDENT .UNINDENT .INDENT 0.0 .INDENT 3.5 Deny the user \(aqbaduser\(aq access to imap and pop3. .UNINDENT .UNINDENT .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C \fBcyr_dbtool\fP /var/lib/imap/user_deny.db flat show .ft P .fi .UNINDENT .UNINDENT .INDENT 0.0 .INDENT 3.5 Show all current database records. .UNINDENT .UNINDENT .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C \fBcyr_dbtool\fP /var/lib/imap/user_deny.db flat get baduser .ft P .fi .UNINDENT .UNINDENT .INDENT 0.0 .INDENT 3.5 Get the current database record(s) for user \(aqbaduser\(aq. .UNINDENT .UNINDENT .SH FILES .sp /etc/imapd.conf .SH SEE ALSO .sp imapd.conf(5) .SH AUTHOR The Cyrus Team, Nic Bernstein (Onlight), Jeroen van Meeuwen (Kolab Systems) .SH COPYRIGHT 1993–2023, The Cyrus Team .\" Generated by docutils manpage writer. .