---
name: "cyr_expire"
section: "8"
platform: "linux"
package: "cyrus-common-2.4"
version: "2.4.16-4+deb7u2"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/cyr_expire"
---

# cyr\_expire(8)

expire messages and duplicate delivery database entries

 \*

## NAME

cyr\_expire - expire messages and duplicate delivery database entries

## SYNOPSIS

**cyr\_expire** \[ **-C** *config-file* \] \[ **-D** *delete-days* \] **-E** *expire-duration* \[ **-X** *expunge-days* \] \[ **-p  mailbox-prefix** \] \[ **-v** \]

## DESCRIPTION

*Cyr\_expire* is used to expire messages and duplicate delivery database entries. *Cyr\_expire* also cleanses mailboxes of partially expunged messages (when using the "delayed" expunge mode). The expiration of messages is controlled by the **/vendor/cmu/cyrus-imapd/expire** mailbox annotation which specifies the age (in days) of messages in the given mailbox that should be deleted.  Any duplicate delivery database entries which correspond to the mailbox are also deleted at the same frequency.\

The value of the **/vendor/cmu/cyrus-imapd/expire** annotation is inherited by all children of the given mailbox, so an entire mailbox tree can be expired by seting a single annotation on the root of that tree.  If a mailbox does not have a **/vendor/cmu/cyrus-imapd/expire** annotation set on it (or does not inherit one), then no messages are expired from the mailbox.

*Cyr\_expire* reads its configuration options out of the [*imapd.conf*(5)](/imapd.conf/5.md) file unless specified otherwise by **-C**.

## OPTIONS

- **-C** *config-file*

  Read configuration options from *config-file*.

- **-D** *delete-duration*

  Remove previously deleted mailboxes older than *delete-duration* (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 **d** (days), **h** (hours), **m** (minutes) and **s** (seconds).

- **-E** *expire-duration*

  Prune the duplicate database of entries older than *expire-duration*. This value is only used for entries which do not have a corresponding **/vendor/cmu/cyrus-imapd/expire** mailbox annotation. Format is the same as delete-duration.

- **-X** *expunge-duration*

  Expunge previously deleted messages older than *expunge-duration* (when using the "delayed" expunge mode). Format is the same as delete-duration.

- **-x**

  **Do not expunge messages even if using delayed expunge mode (reduces the** **IO hit considerably, allowing you to run cyr\_expire frequently to clean** **up the duplicate database without overloading your server)**

- **-p** *mailbox-prefix*

  Only find mailboxes starting with this prefix.  e.g. "user.justgotspammedlots"

- **-v**

  Enable verbose output.

- **-a**

  Skip the annotation lookup, so all **/vendor/cmu/cyrus-imapd/expire** annotations are ignored entirely.  It behaves as if they were not set, so only *expire-days* is considered for all mailboxes.

## FILES

- **/etc/imapd.conf**

  ## SEE ALSO

**[imapd.conf(5)](/imapd.conf/5.md)**, **[cyrmaster(8)](/cyrmaster/8.md)**
