Problem correcting my silly mistake

Dwight Tovey dwight at dtovey.net
Sun Apr 4 20:32:59 EDT 2004


Colin Bruce said:
> Dear All,
>
> We have just started implementing a Cyrus mail system to replace a UW one.
> Anyway, I've managed to make a silly mistake which we can resolve by
> installing from scratch. However, I wonder if someone can explain how to
> solve the problem properly as starting from scratch won't be possible
> once it is all live.
>
> I created a mailbox by typing (in cyradm)
>
>     cm ccx004
>
> instead of
>
>     cm user.ccx004
>
> How do I delete it. I tried dm ccx004 and that didn't work. I can't find
> it on the file system anywhere. When I do lm ccx004 in cyradm it says
> no such mailbox but when I do quota | grep ccx004 it shows the quota that
> I set. I've tried doing a reconstruct -r and also a quota -f but neither
> made any difference. I guess in my many and varied attempts to get rid of
> it I deleted it from the file system so the easiest thing in this case is
> to reinstall from scratch. However, my question is how should I deal with
> such errors in a live system?
>

What error did you get when you tried the 'dm' command?  If you followed
the sequence of steps as you described, I'm betting it was
"deletemailbox: Permission denied"

The problem is by default your 'cyradm' user doesn't have the ACLs to
delete a mailbox.  Probably a good thing to keep some of us from shooting
ourselves.  The solution is to grant the proper ACL permissions first. 
Assuming that you are running 'cyradm' as user 'cyrus', do this:

sam ccx004 cyrus c
dm ccx004

The 'sam' command ("setaclmailbox") will give the 'cyrus' user "Create and
Delete mailbox" permission.  You should then be able to delete the mailbox
with no problems.

    /dwight

-- 
Dwight N. Tovey
email: dwight at dtovey.net
web: http://www.dtovey.net/~dwight
-----------
Reach for the stars, even if you have to stand on a cactus.

---
Home Page: http://asg.web.cmu.edu/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