.\" Man page generated from reStructuredText. . .TH "CYR_EXPIRE" "8" "February 13, 2023" "3.6.1" "Cyrus IMAP" .SH NAME cyr_expire \- 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 Expire messages and duplicate delivery database entries .SH SYNOPSIS .sp .nf \fBcyr_expire\fP [ \fB\-C\fP \fIconfig\-file\fP ] [ \fB\-A\fP \fIarchive\-duration\fP ] [ \fB\-D\fP \fIdelete\-duration\fP ] [ \fB\-E\fP \fIexpire\-duration\fP ] [ \fB\-X\fP \fIexpunge\-duration\fP ] [ \fB\-p\fP \fImailbox\-pre‐fix\fP ] [ \fB\-u\fP \fIusername\fP ] [ \fB\-t\fP ] [ \fB\-v\fP ] [ \fB\-a\fP ] [ \fB\-c\fP ] [ \fB\-x\fP ] .fi .SH DESCRIPTION .sp \fBcyr_expire\fP is used to run a number of regular maintenance tasks on Cyrus databases, specifically: .INDENT 0.0 .IP \(bu 2 expire messages from mailboxes, and .IP \(bu 2 expire entries from the duplicate delivery database, and .IP \(bu 2 cleanse mailboxes of partially expunged messages (when using the “delayed” expunge mode), and .IP \(bu 2 remove deleted mailboxes (when using the “delayed” delete mode), and .IP \(bu 2 expire entries from conversations databases, and .IP \(bu 2 archive messages from mailbox. .UNINDENT .sp There are various annotations that \fBcyr_expire\fP respects: .INDENT 0.0 .IP \(bu 2 \fB/vendor/cmu/cyrus\-imapd/expire\fP which controls the expirations of messages .IP \(bu 2 \fB/vendor/cmu/cyrus\-imapd/archive\fP which controls the archival of messages .IP \(bu 2 \fB/vendor/cmu/cyrus\-imapd/delete\fP which controls the deletion of messages .UNINDENT .sp These mailbox annotations specify the age(in days) of messages in the given mailbox that should be expired/archived/deleted. .sp The value of the \fB/vendor/cmu/cyrus\-imapd/expire\fP 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\fP annotation set on it (or does not inherit one), then no messages are expired from the mailbox. .sp The annotation can be examined using the \fBinfo\fP command of cyradm(8), and modified using the \fBmboxconfig\fP and \fBsetinfo\fP commands of cyradm(8)\&. .sp Expiration of duplicate delivery database entries for a given mailbox is also controlled by the \fB/vendor/cmu/cyrus\-imapd/expire\fP annotation which applies to that mailbox. A value of 0 on the annotation means that no expiration is to be performed on 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\fP option. .sp Expiration of conversations database entries occurs if the \fBconversations\fP option is present in imapd.conf(5)\&. Expiration can be disabled using the \fB\-c\fP option. The period used to expire entries is controlled by the \fBconversations_expire_days\fP option in imapd.conf(5)\&. .sp \fBcyr_expire\fP reads its configuration options out of the imapd.conf(5) file unless specified otherwise by \fB\-C\fP\&. .sp \fBcyr_expire\fP requires at least one of \fB\-A \-D \-E \-X\fP or \fB\-t\fP to be supplied. .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 \-A archive\-duration Archive non\-flagged messages older than \fIarchive\-duration\fP to the archive partition, allowing mailbox messages to be split between fast storage and slow large storage. Only does anything if \fBarchivepartition\-*\fP has been set in your config. This value is only used for entries which do not have a corresponding \fB/vendonr/cmu/cyrus\-imapd/archive\fP mailbox annotation. .sp This feature was introduced in version 3.0. .UNINDENT .INDENT 0.0 .TP .B \-D delete\-duration Remove previously deleted mailboxes older than \fIdelete\-duration\fP (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\fP (days), \fBh\fP (hours), \fBm\fP (minutes) and \fBs\fP (seconds). This value is only used for entries which do not have a corresponding \fB/verdor/cmu/cyrus\-imapd/delete\fP mailbox annotation. .UNINDENT .INDENT 0.0 .TP .B \-E expire\-duration Prune the duplicate database of entries older than \fIexpire\-duration\fP\&. This value is only used for entries which do not have a corresponding \fB/vendor/cmu/cyrus\-imapd/expire\fP mailbox annotation. Format is the same as delete\-duration. .UNINDENT .INDENT 0.0 .TP .B \-X expunge\-duration Expunge previously deleted messages older than \fIexpunge\-duration\fP (when using the “delayed” expunge mode). Format is the same as delete\-duration. .UNINDENT .INDENT 0.0 .TP .B \-c Do not expire conversation database entries, even if the conversations feature is enabled. .sp This feature was introduced in version 3.0. .UNINDENT .INDENT 0.0 .TP .B \-x Do not expunge messages even if using delayed expunge mode. This reduces IO traffic considerably, allowing \fBcyr_expire\fP to be run frequently to clean up the duplicate database without overloading the machine. .UNINDENT .INDENT 0.0 .TP .B \-p mailbox\-prefix Only find mailboxes starting with this prefix, e.g. “user.justgotspammedlots”. .UNINDENT .INDENT 0.0 .TP .B \-u userid Only find mailboxes belonging to this user, e.g. “\fI\%justgotspammedlots@example.com\fP”. .UNINDENT .INDENT 0.0 .TP .B \-t Remove any user flags which are not used by remaining (not expunged) messages. .UNINDENT .INDENT 0.0 .TP .B \-v Enable verbose output. .UNINDENT .INDENT 0.0 .TP .B \-a Skip the annotation lookup, so all \fB/vendor/cmu/cyrus\-imapd/expire\fP annotations are ignored entirely. It behaves as if they were not set, so only \fIexpire\-days\fP is considered for all mailboxes. .UNINDENT .SH EXAMPLES .sp .nf \fBcyr_expire \-E\fP \fI3\fP \fB\-D\fP \fI60\fP \fB\-X\fP \fI60\fP .fi .INDENT 0.0 .INDENT 3.5 Purge duplicates database of all entries older than \fI3\fP days, remove deleted mailboxes older than \fI60\fP days and deleted messages older than \fI60\fP days. .UNINDENT .UNINDENT .sp .nf \fBcyr_expire \-x \-c \-A\fP \fI7d\fP .fi .INDENT 0.0 .INDENT 3.5 Perform migration of message older than \fI7\fP days to Archive partition whilst not altering conversation database nor expunging messages. .UNINDENT .UNINDENT .SH HISTORY .sp Archive partition and conversation support was first introduced in Cyrus version 3.0. .SH FILES .sp /etc/imapd.conf .SH SEE ALSO .sp imapd.conf(5), master(8), cyradm(8) .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. .