Reconstructing mailboxes when using delayed expunge
Paul Engle
pengle at rice.edu
Wed Jul 23 13:44:13 EDT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
- --On Wednesday, July 23, 2008 6:58 PM +0200 Sebastian Hagedorn <Hagedorn at uni-koeln.de> wrote:
> The first issue was finding the deleted mailboxes. It seems they can be anywhere, more or less. We have three partitions. We managed to find them by doing this:
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. You do have to do the ctl_mboxlist -d to get the specific timecode, though. Or visually inspect the filesystem.
> We then copied the contents of the timestamped folders to a newly created folder in the user's mailbox. Our internal documentation said not to copy the metadata (i.e. the cyrus.xxx files), but I don't remember why. Is that the right thing to do? It caused us some headaches later on.
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]
So far, it's not caused a problem.
-paul
- --
Paul D. Engle | Rice University
Sr. Systems Adminstrator, RHCE | Information Technology - MS119
713-348-4702 | PO Box 1892
pengle at rice.edu | Houston, TX 77251-1892
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
iD8DBQFIh23zCpkISWtyHNsRAnNjAKDShe8cqHz2CVAa58vglbt2oQO8kACfcw3u
EkhBcG4h6VUGAQePkYMMNDU=
=mgll
-----END PGP SIGNATURE-----
More information about the Info-cyrus
mailing list