We have quite a large turnover of staff, and over a period of time I noticed that once users accounts were deleted in WGM, (and indeed none functional), their mailboxes were still present and showing up in SA.
There is a how-to floating about (url below) which will kill these mailboxes, but it seems it only works prior to deleting user in WGM.
Anyone any ideas?
This how-to is accurate overall, but there are a few nuances that you might be missing that aren’t explicitly spelled out in the paper.
Read on for the solution…
Like I said, there is nothing wrong with the topicdesk how-to, but you might be missing a key point in how to escape your paths in cyradm. I have quite a few orphaned mailboxes on my server after I was working on a few articles. I removed all my test users, but didn’t delete the mailboxes and they show up in Server Admin. Let’s delete one together…
First I need to login to cyradm with an IMAP admin user. These users are defined in a comma delimited list in /etc/imapd.conf. Logging in is easy to do, ssh into the server and do
/usr/bin/cyrus/admin/cyradm -u mailadmin localhost
Enter your password and you should be delivered to a localhost prompt.
Now take a look at the mailboxes with lm. In my case I see the box I want to delete listed as
Other Users/p10002 (HasNoChildern)
Next we need to give our mailadmin user full control of the mailbox, otherwise we won’t be able to delete it. To do this we need to add an ACL to the mailbox with
sam Other\ Users/p10002 mailadmin all
Note that you must escape your paths in cyradm!
Now we can delete the mailbox with
dm Other\ Users/p10002
Exit out of cyradm and click refresh in Server Admin. You should see the user’s box disappear from the list in the Accounts tab.
The part that most people miss is that you need to escape the paths in cyradm. Give it a try and let us know in the comments below if you had any luck.
As always, read the man pages and have fun!