> I think there isn't a all-in-one command for this use case: a user > expunged some messages and deleted some folders somewhere. I want to > recover all expunged messages and all the deleted folders which are no > more present in the original IMAP server (because they were expired from > cyr_expire). > > I have to set "-x" to avoid duplication of messages. > With "-a -x" I recover all expunged messages and all deleted mailboxes. > But messages inside deleted mailboxes are not marked as expunged, so > these mailboxes are recovered empty in the IMAP server. I would run restore twice in this case: once without -x, specifying just the deleted mailboxes (you can use "cyr_backup list mailboxes ..." to get a list of the mailboxes in the user's backup). And once with -x to get all the expunged stuff. For the -x invocation only, I would probably also use the -M option to dump all the recovered stuff into a new folder, so they can easily tell it apart from any new mail that might have arrived coincidentally at the same time. > Another idea is to recover all in another empty IMAP server, without > "-x" at all, and the user can look at the mailbox recovered there... We kinda had a similar idea! Putting it all into a folder with -M is much easier than setting up a separate server, but it'll lose the folder structure. Recovering to a separate server means the folder structure can be preserved. I guess it depends on the specific recovery situation, and how hard it is to spin up a server in your environment. Cheers, ellie ---- 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