Re: Reconstructing mailboxes when using delayed expunge

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

 



Hi,

--On 23. Juli 2008 12:44:13 -0500 Paul Engle <pengle@xxxxxxxx> wrote:

You can specify the prefix for deleted mailboxes with the 'deletedprefix'
option in imapd.conf. It defaults to DELETED, so anything deleted will go
into a tree starting with that, preserving the same structure as on the
live partition.

I was aware of that, but with three partitions you won't know on which it is and which hash letter was used (we are using fulldirhash as well).

It's been our understanding that the delayed delete process is really
just a rename under the hood. It just renames the mailboxes to somewhere
outside the 'normal' area so that users no longer see them.

As such, we've generally had success by just doing another rename to get
the mailbox back. If the user hadn't gone and created a new mailbox with
the same name, then it would just be:

cyradm> rename DELETED/user/foo/bar/baz/TIMECODE user/foo/bar/baz
[partition]

If the mailbox was indeed recreated in the interim, then we usually just
add a suffix to the mailbox and tell the user where it is:

cyradm> rename DELETED/user/foo/bar/baz/TIMECODE user/foo/bar/baz_RESTORE
[partition]

That's great! I wish I had known that before :-)

--On 23. Juli 2008 20:41:52 -0400 Wesley Craig <wes@xxxxxxxxx> wrote:

On 23 Jul 2008, at 13:44, Paul Engle wrote:
You do have to do the ctl_mboxlist -d to get the specific timecode,
though.

You can also use, e.g.:

	cyradm> lm DELETED.user.wc2263.*
	DELETED.user.wc2263.EG.487BF83F (\HasNoChildren)
	DELETED.user.wc2263.XXX.487BF841 (\HasNoChildren)
	DELETED.user.wc2263.XXX.4887CA8E (\HasNoChildren)
	cyradm>

That's another great tip!

A little convoluted, but you can get the human readable time by
subtracting the time code above (which is in hex) from "now".  E.g.:

	: ; date +"%s"
	1216859626
	: ; dc
	1216859626
	16i
	487BF841 -p
	1216084033
	775593
	: ; date --date="-775593 seconds"
	Mon Jul 14 21:11:28 EDT 2008
	: ;

OK, maybe more than a little convoluted...

I'm note really a dc fiend, so I'm not 100% sure what you are doing there, but doesn't this work just as well?

% perl -e 'print scalar localtime(hex "487BF841")."\n"'
Tue Jul 15 03:07:13 2008

The difference in time is only because of our different timezones ...

Thanks for all the help, Sebastian
--
    .:.Sebastian Hagedorn - RZKR-R1 (Gebäude 52), Zimmer 18.:.
Zentrum für angewandte Informatik - Universitätsweiter Service RRZK
.:.Universität zu Köln / Cologne University - ✆ +49-221-478-5587.:.
                  .:.:.:.Skype: shagedorn.:.:.:.

Attachment: pgpgqR54sFvxl.pgp
Description: PGP signature

----
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

[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