Re: Delayed expunge / undeleting messages
> Hi! > > The purpose of the delayed expunge mode appears to be to reduce the > amount of disk I/O during expunge and add responsiveness to the client. > But I've been thinking... I've got lots of users that accidentally > delete important messages, and sometimes even ask us immediately after > deleting (and expunging) those messages if they could be recovered. Now > if the message was alive last night when we backed the system up, it > could be recovered. But if the message was new, it couldn't. > > But if there is a delay in expunging the message, the file containing > the mesage might just lie around in the mail spool, and could be > identified reasonably easily. Is there a way to add the message back > to the index? A quick hack would probably be something like copying the > message file to N., where N is an unused message number, and > reconstructing the mailbox. But is there another way? I always feel > uncomfortable writing stuff to the mailspool bypassing Cyrus. > Isn't that what unexpunge is for? List deleted messages: su - cyrus -c "/usr/lib/cyrus-imapd/unexpunge -l user.x" Unexpunge a single message: su - cyrus -c "/usr/lib/cyrus-imapd/unexpunge -u -d -v user.x 14156" Unexpunge all deleted messages: su - cyrus -c "/usr/lib/cyrus-imapd/unexpunge -a -d -v user.x" Our expunge delay is 7 days and it works wonderful. Simon Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Delayed expunge / undeleting messages
Janne Peltonen wrote: Hi! The purpose of the delayed expunge mode appears to be to reduce the amount of disk I/O during expunge and add responsiveness to the client. But I've been thinking... I've got lots of users that accidentally delete important messages, and sometimes even ask us immediately after deleting (and expunging) those messages if they could be recovered. Now if the message was alive last night when we backed the system up, it could be recovered. But if the message was new, it couldn't. But if there is a delay in expunging the message, the file containing the mesage might just lie around in the mail spool, and could be identified reasonably easily. Is there a way to add the message back to the index? A quick hack would probably be something like copying the message file to N., where N is an unused message number, and reconstructing the mailbox. But is there another way? I always feel uncomfortable writing stuff to the mailspool bypassing Cyrus. You can use the unexpunge tool to put mail back into the mail folder. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Rudy Gevaert [EMAIL PROTECTED] tel:+32 9 264 4734 Directie ICT, afd. Infrastructuur ICT Department, Infrastructure office Groep SystemenSystems group Universiteit Gent Ghent University Krijgslaan 281, gebouw S9, 9000 Gent, Belgie www.UGent.be -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Delayed expunge / undeleting messages
But if there is a delay in expunging the message, the file containing the mesage might just lie around in the mail spool, and could be identified reasonably easily. Is there a way to add the message back to the index? There is a command unexpunge in Cyrus 2.3, that does exactly what you describe. -- Leena Heino University of Tampere / Computer Centre ( liinu at uta.fi ) ( http://www.uta.fi/laitokset/tkk ) Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Delayed expunge / undeleting messages
On Thu, Jan 18, 2007 at 09:57:05AM +0100, Simon Matter wrote: > Isn't that what unexpunge is for? On Thu, Jan 18, 2007 at 10:30:47AM +0100, Rudy Gevaert wrote: > You can use the unexpunge tool to put mail back into the mail folder. On Thu, Jan 18, 2007 at 12:09:06PM +0200, Leena Heino wrote: > There is a command unexpunge in Cyrus 2.3, that does exactly what you > describe. Thanks, all. :) I've been trying to read the documentation completely before asking abt things on this list, but this time I seem to have been lazy... ;) --Janne Peltonen Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Delayed expunge / undeleting messages
Hi run unexpunge as user cyrus unexpunge [-C ] -l unexpunge [-C ] -a [-d] [-v] unexpunge [-C ] -u [-d] [-v] ... Quoting Janne Peltonen <[EMAIL PROTECTED]>: Hi! The purpose of the delayed expunge mode appears to be to reduce the amount of disk I/O during expunge and add responsiveness to the client. But I've been thinking... I've got lots of users that accidentally delete important messages, and sometimes even ask us immediately after deleting (and expunging) those messages if they could be recovered. Now if the message was alive last night when we backed the system up, it could be recovered. But if the message was new, it couldn't. But if there is a delay in expunging the message, the file containing the mesage might just lie around in the mail spool, and could be identified reasonably easily. Is there a way to add the message back to the index? A quick hack would probably be something like copying the message file to N., where N is an unused message number, and reconstructing the mailbox. But is there another way? I always feel uncomfortable writing stuff to the mailspool bypassing Cyrus. --Janne Peltonen Email admin Univ. of Helsinki Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html M.Menge Tel.: (49) 7071/29-70316 Universitaet Tuebingen Fax.: (49) 7071/29-5912 Zentrum fuer Datenverarbeitung mail: [EMAIL PROTECTED] Waechterstrasse 76 72074 Tuebingen smime.p7s Description: S/MIME krytographische Unterschrift Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Delayed expunge / undeleting messages
A bunch of people already pointed out unexpunge, so I'll point out that the delayed expunge / unexpunge functionality doesn't help if the user deletes a whole folder. See: https://bugzilla.andrew.cmu.edu/show_bug.cgi?id=2871 for the problem report and a patch for a proposed solution. :wes On 18 Jan 2007, at 02:34, Janne Peltonen wrote: The purpose of the delayed expunge mode appears to be to reduce the amount of disk I/O during expunge and add responsiveness to the client. But I've been thinking... I've got lots of users that accidentally delete important messages, and sometimes even ask us immediately after deleting (and expunging) those messages if they could be recovered. Now if the message was alive last night when we backed the system up, it could be recovered. But if the message was new, it couldn't. But if there is a delay in expunging the message, the file containing the mesage might just lie around in the mail spool, and could be identified reasonably easily. Is there a way to add the message back to the index? A quick hack would probably be something like copying the message file to N., where N is an unused message number, and reconstructing the mailbox. But is there another way? I always feel uncomfortable writing stuff to the mailspool bypassing Cyrus. Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Delayed expunge / undeleting messages
> A bunch of people already pointed out unexpunge, so I'll point out > that the delayed expunge / unexpunge functionality doesn't help if > the user deletes a whole folder. See: > > https://bugzilla.andrew.cmu.edu/show_bug.cgi?id=2871 > > for the problem report and a patch for a proposed solution. I also found out that delayed_expunge doesn't help if a whole folder got deleted. So if something like your proposed solution gets included that would really be a very nice feature. Simon Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Delayed expunge / undeleting messages
https://bugzilla.andrew.cmu.edu/show_bug.cgi?id=2871 I also found out that delayed_expunge doesn't help if a whole folder got deleted. So if something like your proposed solution gets included that would really be a very nice feature. Agreed. This would also allow for "complete" backups of all emails and all folders. Currently there's a window of emails uploaded/delivered between the last backup and a folder being deleted that can never be restored. I know David Carter implemented a patch for this in 2.2. I'm not sure if Wesley's patch is related to it or a completely separate implementation. Rob Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Delayed expunge / undeleting messages
On 19 Jan 2007, at 05:50, Rob Mueller wrote: I know David Carter implemented a patch for this in 2.2. I'm not sure if Wesley's patch is related to it or a completely separate implementation. Completely separate, tho my is based on comment from David suggesting how he would do it if he were to do it again, i.e., very simply. I like simple, it's easier to write :) :wes Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
RE: Delayed expunge / undeleting messages
unexpunge will segfault if the specified folder does not contain a cyrus.expunge file. I have reported this in bug 1905. > -Original Message- > From: [EMAIL PROTECTED] [mailto:info-cyrus- > [EMAIL PROTECTED] On Behalf Of Simon Matter > Sent: Thursday, January 18, 2007 3:57 AM > To: Cyrus Info List > Subject: Re: Delayed expunge / undeleting messages > > > Hi! > > > > The purpose of the delayed expunge mode appears to be to reduce the > > amount of disk I/O during expunge and add responsiveness to the client. > > But I've been thinking... I've got lots of users that accidentally > > delete important messages, and sometimes even ask us immediately after > > deleting (and expunging) those messages if they could be recovered. Now > > if the message was alive last night when we backed the system up, it > > could be recovered. But if the message was new, it couldn't. > > > > But if there is a delay in expunging the message, the file containing > > the mesage might just lie around in the mail spool, and could be > > identified reasonably easily. Is there a way to add the message back > > to the index? A quick hack would probably be something like copying the > > message file to N., where N is an unused message number, and > > reconstructing the mailbox. But is there another way? I always feel > > uncomfortable writing stuff to the mailspool bypassing Cyrus. > > > > Isn't that what unexpunge is for? > > List deleted messages: > su - cyrus -c "/usr/lib/cyrus-imapd/unexpunge -l user.x" > > Unexpunge a single message: > su - cyrus -c "/usr/lib/cyrus-imapd/unexpunge -u -d -v user.x > 14156" > > Unexpunge all deleted messages: > su - cyrus -c "/usr/lib/cyrus-imapd/unexpunge -a -d -v user.x" > > Our expunge delay is 7 days and it works wonderful. > > Simon > > Cyrus Home Page: http://cyrusimap.web.cmu.edu/ > Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki > List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html