Re: undelete a single message, delete_mode + expunge_mode activated

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10 Mar 2014, at 20:31, Marcus Schopen <lists@xxxxxxxxxxxx> wrote:
> 
> When deleting a single message from Inbox or a subfolder these message
> are not moved into a DELETED structure and keep staying at their
> originally place on filesystem. Those messages are definitely delete. I
> can't see them in my imap client anymore (tested with evolution and
> Thunderbird). How do I undelete these single messages?

Undeleting messages in a mailbox

The following examples assume you have an installation of cyrus where there are binaries in /usr/lib/cyrus-imapd/ - if not, adjust path to suit.

List messages available to unexpunge:

# su cyrus -c "/usr/lib/cyrus-imapd/unexpunge -l user/simon@xxxxxxxxx"

Each message will give you something like the following:

UID: 11422
	Size: 7786
	Sent: Mon Mar 10 12:00:00 2014
	Recv: Mon Mar 10 16:06:32 2014
	Expg: Mon Mar 10 16:53:55 2014
	From: john wade <jwade@xxxxxxxxxx>
	To  : <info-cyrus@xxxxxxxxxxxxxxxxxxxx>
	Cc  : 
	Bcc : 
	Subj: {44}
re: sieveshell aborts with "expected rparen"

To unexpunge a single message:

# su cyrus -c "/usr/lib/cyrus-imapd/unexpunge -udv user/simon@xxxxxxxxx 11422"
restoring expunged messages in mailbox 'user/simon@xxxxxxxxx'
Unexpunged user/simon@xxxxxxxxx: 11422 => 11438
restored 1 expunged messages

To unexpunge all the messages and mark them as undeleted as well:

# su cyrus -c "/usr/lib/cyrus-imapd/unexpunge -adv user/simon@xxxxxxxxx"

NOTE: This isn't recursive

It will only restore the inbox. To find other folders run

# su cyrus -c "/usr/lib/cyrus-imapd/ctl_mboxlist -d" | grep leaky.org
leaky.org!user.simon	0 default simon@xxxxxxxxx	lrswipkxtecda	
leaky.org!user.simon.Lists	0 default simon@xxxxxxxxx	lrswipkxtecda	
leaky.org!user.simon.Lists.cyrus	0 default simon@xxxxxxxxx	lrswipkxtecda	
leaky.org!user.simon.Deleted Messages	0 default simon@xxxxxxxxx	lrswipkxtecda	

Run the unexpunge command for every folder that needs to have mail undeleted.

For folder names that have spaces ' ', the spaces need to be escaped with a backslash

su cyrus -c "/usr/lib/cyrus-imapd/unexpunge -adv user/simon/Deleted\ Messages@xxxxxxxxx"

----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus




[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux