Moving/Renaming Top Level Mailboxes

Greg Harris gharris at mail.nixa.k12.mo.us
Mon Feb 28 12:42:07 EST 2005


> On Fri, 25 Feb 2005, Greg Harris wrote:
> 
> > Hello All,
> >
> > I am afraid that I am feeling a little confused and lost. Running
> > Cyrus-Imapd-2.2.8, Cyrus-Sasl*-2.1.15, MySQL-3.23.58, Postfix-2.1.5 and
> PERL
> > 5.8 on a mostly current RHEL3 clone.
> >
> > I am logged in as cyrus using cyradm and all folders have cyrus rights.
> In
> > imapd.conf, allowusermoves: yes.
> >
> > I can rename mailboxes inside a user:
> > 	renm user.test.test user.test.test2
> >
> > I can rename mailboxes to different users with major issues:
> > 	renm user.test.test user.test2.test
> > Only problem is, this is listed in a folder called "Other Users" in
> > user.test rather than user.test2 when using an IMAP client (Horde/IMP).
> lm
> > lists the mailbox under user.test2.
> >

Andy hit this one on the head.  The rights are not assigned automatically.
You have to renm the mailbox, sam the new user rights and then lam the old
user rights, for each and every mailbox underneath the top level.  (What
about adding a flag to renm that would change those rights automatically?)

> > I can not rename top level boxes:
> > 	renm user.test user.test2
> > 	renamemailbox: Operation is not supported on mailbox
> >
> > If I copy a mailbox and reconstruct:
> > 	cp -r /var/spool/imap/user/test /var/spool/imap/user/test2
> > 	reconstruct -r user.test2
> > I get the "Other Users" folder using IMAP client, and nothing listed in
> > cyradm.

Still can't renm the top level boxes, but I can cp -Rp
/var/spool/imap/user/test/* /var/spool/imap/user/test2 the files over from
one mailbox the other and then have the e-mails show up.  It also looks like
another set of sam and dam commands to clean everything up, (or I screwed up
something else while playing).  Anyway, all of the mail was moved, complete
with delete flag.  Then, of course the old user will have to be deleted.

> > I am out of ideas for info searches and trying new things.  The scripts
> from
> > the old O'Reilly book, (Chap 9), also do not work.  Any other
> information
> > that I can give, I will.  I also can not seem to find any way to run
> cyradm
> > in debug or send to a log.
> 
> I have not attempted user renames myself (we have a script to copy a
> mailbox over IMAP, then delete the old mailbox).  However, if you are
> seeing the new mailbox under Other Users, then it sounds like the ACLs
> were not updated during the move.  I don't know if they are supposed to be
> automatically updated or not, since this could cause unexpected access
> changes.
> 
>  	Andy

A FAQ covering these issues would probably be helpful to a lot of people,
however, a cyradm script should be extraordinarily easy to create, (if you
know the perl to do it, which I currently don't.)  Andy, you mention a
script and it seems like the script does exactly what I have done the long
hard way.  Is there a link to this script?  Is it something that is easily
run?  Slightly off list, but is this a script that could be easily added to
web-cyradm?  (This would be the most preferred way, so that we can have
admins unfamiliar with CLI quickly do this stuff).

Thanks,

Greg Harris

---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list