carta
cyrus-unexpunge(8)

cyrus-unexpunge8

Cyrus imap documentation recover messages the user has (accidentally) deleted.

Overview

The unexpunge program is used to list or restore messages which have been deleted from a mailbox, but still reside in the Cyrus IMAP mail spool.

This utility is only useful when the server is configured with expunge_mode set to delayed in its configuration file.

unexpunge reads its configuration options out of the imapd.conf(5) file unless specified otherwise by -C.

Options

-C config-file

Use the specified configuration file config-file rather than the default imapd.conf(5).

-l, --list

List the expunged messages in the specified mailbox which are available for restoration. Optionally, only list the messages in the mailbox matching the UIDs in the space-separated list at the end of the command invocation.

-t time-interval, --within-time-interval=time-interval

Unexpunge messages which were expunged within the last time-interval seconds. Use one of the trailing modifiers -- m (minutes), h (hours), d (days) or w (weeks) -- to specify a different time unit.

-a, --all

Restore all of the expunged messages in the specified mailbox.

-u, --uids

Restore only messages matching the UIDs, in a space-separated list at the end of the command invocation, in the specified mailbox.

-d, --unset-deleted

Unset the \Deleted flag on any restored messages.

-f flagname, --set-flag=flagname

Set the user flag \flagname on the messages restored, making it easier for the user(s) to find the restored messages and operate on them (in a batch).

-v, --verbose

Enable verbose output/logging.

Examples

unexpunge -l user/[email protected]

List the messages that are expunged and could be restored for mailbox user/[email protected].

unexpunge -u user/[email protected] 278787 278788

Unexpunge two of these messages.

mbexamine user/[email protected]

Examine the mailbox for the two restored messages.

unexpunge -u -d user.johnsmith 46908

Unexpunge a select message based on its UID, clearing the \Deleted flag.

unexpunge -a user.johnsmit.Trash

Unexpunge all messages in a user's Trash, but leave them flagged \Deleted.

unexpunge -a -f Flagged user.johnsmith.Trash

The same, but setting user flag \Flagged to facilitate later bulk operations.

unexpunge -t 24h -d -f Flagged user.johnsmith

Unexpunge messages matching only a given time period.

unexpunge -t 24h -d -f Flagged user/johnsmith

The same command, supporting the unixhierarchysep: yes option in imapd.conf(5).

Files

/etc/imapd.conf

History

  • Debian 13 (Trixie): the text shown here
  • Debian 12 (Bookworm)
  • Debian 11 (Bullseye)
  • Debian 10 (Buster)
  • Debian 9 (Stretch)
  • Debian 8 (Jessie) to Debian 7 (Wheezy)

--all since Debian 13 (Trixie); --list since Debian 13 (Trixie); --set-flag since Debian 13 (Trixie); --uids since Debian 13 (Trixie); --unset-deleted since Debian 13 (Trixie); --verbose since Debian 13 (Trixie); --within-time-interval since Debian 13 (Trixie); -C since Debian 10 (Buster); -f since Debian 10 (Buster); -t since Debian 10 (Buster).

Author

The Cyrus Team, Nic Bernstein (Onlight), Jeroen van Meeuwen (Kolab Systems)

From cyrus-common 3.10.2-1+deb13u2 in Debian 13 (Trixie). Parsed by carta from the page's man source.