User mailbox renames

Ken Murchison ken at oceana.com
Mon Sep 30 08:15:05 EDT 2002


Quoting Roland Pope <rpope at jade.co.nz>:

> Hi,
> 
> I am running cyrus-imapd 2.1.9 and I would like to be able to rename a
> user's mailbox.
> When I try a rename using cyradm, it tells me "Operation is not supported
> on
> mailbox". From having a look at the source, it appears you can only rename
> a
> top level mailbox when using murder. Is this the case?

Actually, in a Murder, the user's mailboxes are XFERd between servers.  User 
RENAMEs are enabled in 2.2, if you want to try it.

> I tried creating the new destination mailbox and copying the original users
> files across to this and running reconstruct. The problem I have then is
> that I loose the original subscriptions and seen states?
> I can fiddle the user subscription file, but the seen states are stored in
> a
> skiplist DB and I'm not sure how to go about converting this file for the
> renamed mailbox.

You shouldn't have to convert it.  Each mailbox has a unique id which stays 
constant once the mailbox is created.  Just copy /var/imap/user/f/foo.seen to 
/var/imap/user/b/bar.seen.

> Anybody out there got a solution to this, maybe a malbox rename script??

You'll also want to move the user's quota file(s) and any Sieve scripts.  The 
biggest problem you're going to have is that the ACLs on the user's mailboxes 
are going to have to be changed so that the new user has access to them.

Ken
-- 
Kenneth Murchison     Oceana Matrix Ltd.
Software Engineer     21 Princeton Place
716-662-8973 x26      Orchard Park, NY 14127
--PGP Public Key--    http://www.oceana.com/~ken/ksm.pgp




More information about the Info-cyrus mailing list