.\" -*- nroff -*- .TH CYR_EXPIRE 8 "Project Cyrus" CMU .\" .\" Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in .\" the documentation and/or other materials provided with the .\" distribution. .\" .\" 3. The name "Carnegie Mellon University" must not be used to .\" endorse or promote products derived from this software without .\" prior written permission. For permission or any legal .\" details, please contact .\" Carnegie Mellon University .\" Center for Technology Transfer and Enterprise Creation .\" 4615 Forbes Avenue .\" Suite 302 .\" Pittsburgh, PA 15213 .\" (412) 268-7393, fax: (412) 268-7395 .\" innovation@andrew.cmu.edu .\" .\" 4. Redistributions of any form whatsoever must retain the following .\" acknowledgment: .\" "This product includes software developed by Computing Services .\" at Carnegie Mellon University (http://www.cmu.edu/computing/)." .\" .\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO .\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY .\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE .\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN .\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .SH NAME cyr_expire \- expire messages and duplicate delivery database entries .SH SYNOPSIS .B cyr_expire [ .B \-C .I config-file ] [ .BI \-D " delete-duration" ] [ .BI \-E " expire-duration" ] [ .BI \-X " expunge-duration" ] [ .BI \-p " mailbox-prefix" ] [ .BI \-u " username" ] [ .B \-t ] [ .B \-v ] .SH DESCRIPTION .PP \fBCyr_expire\fR is used to run a number of regular maintenance tasks on Cyrus databases, specifically: .IP \(bu 2m expire messages from mailboxes, and .IP \(bu 2m expire entries from the duplicate delivery database, and .IP \(bu 2m cleanse mailboxes of partially expunged messages (when using the "delayed" expunge mode), and .IP \(bu 2m remove deleted mailboxes (when using the "delayed" delete mode). .PP The expiration of messages is controlled by the \fB/vendor/cmu/cyrus-imapd/expire\fR mailbox annotation which specifies the age (in days) of messages in the given mailbox that should be deleted. A value of 0 means that no expiration is to be performed on that mailbox. .PP The value of the \fB/vendor/cmu/cyrus-imapd/expire\fR annotation is inherited by all children of the mailbox on which it is set, so an entire mailbox tree can be configured by setting a single annotation on the root of that tree. If a mailbox does not have a \fB/vendor/cmu/cyrus-imapd/expire\fR annotation set on it (or does not inherit one), then no messages are expired from the mailbox. .PP The annotation can be examined using the \fBinfo\fR command of \fBcyradm(1p)\fR, and modified using the \fBmboxconfig\fR and \fBsetinfo\fR commands of \fBcyradm(1p)\fR. .PP Expiration of duplicate delivery database entries for a given mailbox is also controlled by the \fB/vendor/cmu/cyrus-imapd/expire\fR annotation which applies to that mailbox. Unlike message expiration, if no annotation applies to the mailbox then duplicate database entries are expired using the value given to the \fB-E\fR option. .PP \fBCyr_expire\fR reads its configuration options out of the \fIimapd.conf\fR(5) file unless specified otherwise by \fB-C\fR. .PP \fBCyr_expire\fR requires at least one of \fB-D -E\fR \fB-X\fR or \fB-t\fR to be supplied. .SH OPTIONS .TP \fB\-C\fI config-file\fR Read configuration options from \fIconfig-file\fR. .TP \fB\-D \fIdelete-duration\fR Remove previously deleted mailboxes older than \fIdelete-duration\fR (when using the "delayed" delete mode). The value can be a floating point number, and may have a suffix to specify the unit of time. If no suffix, the value is number of days. Valid suffixes are \fBd\fR (days), \fBh\fR (hours), \fBm\fR (minutes) and \fBs\fR (seconds). .TP \fB\-E \fIexpire-duration\fR Prune the duplicate database of entries older than \fIexpire-duration\fR. This value is only used for entries which do not have a corresponding \fB/vendor/cmu/cyrus-imapd/expire\fR mailbox annotation. Format is the same as delete-duration. .TP \fB\-X \fIexpunge-duration\fR Expunge previously deleted messages older than \fIexpunge-duration\fR (when using the "delayed" expunge mode). Format is the same as delete-duration. .TP \fB\-x Do not expunge messages even if using delayed expunge mode. This reduces IO traffic considerably, allowing \fBcyr_expire\fR to be run frequently to clean up the duplicate database without overloading the machine. .TP \fB\-p \fImailbox-prefix\fR Only find mailboxes starting with this prefix, e.g. "user.justgotspammedlots". .TP \fB\-u \fIuserid\fR Only find mailboxes belonging to this user, e.g. "justgotspammedlots@example.com". .TP \fB\-t\fR Remove any user flags which are not used by remaining (not expunged) messages. .TP .B \-v Enable verbose output. .TP .B \-a Skip the annotation lookup, so all \fB/vendor/cmu/cyrus-imapd/expire\fR annotations are ignored entirely. It behaves as if they were not set, so only \fIexpire-days\fR is considered for all mailboxes. .SH FILES .TP .B /etc/imapd.conf .SH SEE ALSO .PP \fBimapd.conf(5)\fR, \fBcyrmaster(8)\fR, \fBcyradm(1p)\fR