UNEXPUNGE(8)
π UNEXPUNGE(8) π
okay bestie, listen up β this is unexpunge, a Cyrus IMAP joint, and it's literally here to save you when someone (or honestly, you) deleted the wrong emails. No cap. π«Ά
β¨ NAME β¨
unexpunge β Cyrus IMAP documentation
Recover messages the user has (accidentally) deleted. πβ‘οΈπ
πΈ SYNOPSIS πΈ
unexpunge [ -C config-file ] -l mailbox [ uid... ]
unexpunge [ -C config-file ] -t time-interval [ -d ] [ -v ] [ -f flagname ] mailbox
unexpunge [ -C config-file ] -a [ -d ] [ -v ] [ -f flagname ] mailbox
unexpunge [ -C config-file ] -u [ -d ] [ -v ] [ -f flagname ] mailbox uid...
four whole ways to run it, pick your fighter π
π¦ DESCRIPTION π¦
So the unexpunge program is the one that lists or restores messages that have been deleted from a mailbox but are still, like, physically chilling in the Cyrus IMAP mail spool. They're not gone gone, they're just in their deleted era. π
vibe check tho: this utility is only useful when the server is configured withexpunge_modeset todelayedin its configuration file. If it's not set todelayed, bestie, there's nothing to recover. Periodt.
unexpunge reads its configuration options out of the imapd.conf(5) file unless you say otherwise with -C. π
π OPTIONS π
-Cconfig-file β use the specified configuration file config-file instead of the defaultimapd.conf(5). your config, your rules.-l,--listβ list the expunged messages in the specified mailbox that 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. window shopping for emails π-ttime-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) orw(weeks) β to specify a different time unit. time math but make it cute β°-a,--allβ restore all of the expunged messages in the specified mailbox. the everything button-u,--uidsβ restore only messages matching the UIDs, in a space-separated list at the end of the command invocation, in the specified mailbox. hand-picked, curated, iconic β¨-d,--unset-deletedβ unset the\Deletedflag on any restored messages. taking off the "yes I'm deleted" sticker-fflagname,--set-flag=flagnameβ set the user flag\flagnameon the messages restored, making it easier for the user(s) to find the restored messages and operate on them (in a batch). tagging them so future-you can find them π·οΈ-v,--verboseβ enable verbose output/logging. tell me everything, I want the tea β
π₯ EXAMPLES π₯
the receipts, let's go:
unexpunge -l user/john@example.org
List the messages that are expunged and could be restored for mailbox user/john@example.org. just looking, not touching π«£
unexpunge -u user/john@example.org 278787 278788
Unexpunge two of these messages. two lil guys saved π
mbexamine user/john@example.org
Examine the mailbox for the two restored messages. proof they're actually back, no cap
unexpunge -u -d user.johnsmith 46908
Unexpunge a select message based on its UID, clearing the \Deleted flag. one specific babe, and un-deleted
unexpunge -a user.johnsmit.Trash
Unexpunge all messages in a user's Trash, but leave them flagged \Deleted. everything out of the bin, but they still got the label
unexpunge -a -f Flagged user.johnsmith.Trash
The same, but setting user flag \Flagged to facilitate later bulk operations. now you can batch them later, slay π
unexpunge -t 24h -d -f Flagged user.johnsmith
Unexpunge messages matching only a given time period. last 24 hours only, we're not doing the whole year
unexpunge -t 24h -d -f Flagged user/johnsmith
The same command, supporting the unixhierarchysep: yes option in imapd.conf(5). same energy, different separator, iykyk
π FILES π
/etc/imapd.conf
π SEE ALSO π
π AUTHOR π
The Cyrus Team, Nic Bernstein (Onlight), Jeroen van Meeuwen (Kolab Systems)
absolute legends, all of them β¨
π COPYRIGHT π
1993β2026, The Cyrus Team
and that's the whole page, bestie!! this was Cyrus IMAP version 3.12.4, dated Sep 09, 2026 β go forth and un-expunge responsibly, mwah ππ π¦
π¦ where this page comes from
- fedora 44: cyrus-imapd 3.12.4-1.fc44 Β· BSD-Attribution-HPND-disclaimer
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms