> Mordur wrote: >> Hi all, >> >> I would like to delete about 550 users from Cyrus imap. Does anyone have >> a script or advice for me how to do that without me having to manually >> grant cyrus user the delete right for each user and then deleting? Any >> advice greatly appreciated. >> > > You could try: > > cyradm host > sam user.* cyrus x > (if x it the flag, I'm not sure at the moment) > dm user.* > > if that doesn't work put a % in stead of a * > > I want to apologize for wasting anyones time, but I figured this out. This confused me no end, so I just want to explain what it was I was trying to do, in case this could help anyone else. My implementation of Cyrus IMAP is one of virtual domains. In this case, I needed to remove all users of a certain domain, superflous.biz, but no others. An example of a users top level mailbox is this: user/ziggi@xxxxxxxxxxxxxx (\HasChildren) And a sub-box like this: user/ziggi/Sent@xxxxxxxxxxxxxx (\HasNoChildren) What I had to do to grant user cyrus all rights was simply: --- > localhost> sam user/*@superflous.biz cyrus all and this granted user cyrus all rights on every mailbox and sub-mailbox for domain superflous.biz I, then, thought I was home free, and tried: --- > dm user/*@superflous.biz But this delivered me an error message informing me that there was no such mailbox as user/Drafts/someuser@xxxxxxxxxxxxxxx The user was, in fact, deleted, and so were his sub-mailboxes, but the error stopped the process so I would have had to reissue the command for every user. I didn't feel like doing that 533 times. The solution to this was: --- > dm user/*/*@superflous.biz To delete all the sub-mailboxes, and only then: --- > dm user/*@superflous.biz to remove the top level mailbox. Hope this can help someone. Mordur Ingolfsson ---- Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html