Issue or symptom
If you delete an email user from Mac OS X 10.4 Server, the deleted user's mailboxes are not automatically removed from the mail store.
Products affected
Solution
Use these steps to remove the deleted user's mailboxes.
Note: These steps involve editing a cyrus configuration file. If you're not familiar with editing text configuration files, see this article before proceeding.
- Open the file (/etc/imapd.conf) and look for this line:
admins: cyrusimap
- Consider which user that you would like to be able to function as the mail administrator. The local administrative account may be a good choice. Add that user's short name after cyrusimap separated by a comma and space. For example, if the administrator has a short name of "appleadmin", the result should look like this:
admins: cyrusimap, appleadmin
-
Save the file and restart the Mail service with Server Admin.
Note: The administrator that was set up in the previous step must have IMAP mail enabled for them in Workgroup Manager. In addition, IMAP access must be enabled in Server Admin -> Mail -> Settings -> General. Verify that the account has IMAP mail enabled in Server Admin and, if not, enable it.
- Open Terminal on the server and enter the following command on a single line:
/usr/bin/cyrus/admin/cyradm -u appleadmin localhost
- You'll be prompted for the account password. Enter it, then you'll see the cyradm interactive prompt:
localhost>
Note:
If desired, type "?" (without quotes) to see a full command list and explanation of each command.
Note: To see a list of all the user's mailboxes, use the lm *username* command.
- Use the sam command to create an ACL on the mailbox so that appleadmin has access to delete it.
- Use the dm command to delete the appropriate mailbox.
Example
After a user named "misteruser" has been deleted from Workgroup Manager:
- Complete steps 1-4 above.
- get a list of just misteruser's mailboxes with this command (at the localhost> prompt):
lm *misteruser*
This shows mailboxes such as this:
Other Users/misteruser (\\HasChildren)
Other Users/misteruser/Sent Messages (\\HasNoChildren)
Other Users/misteruser/Drafts (\\HasNoChildren)
Other Users/misteruser/Sent Messages (\\HasNoChildren)
-
Examine the current ACL on their top-level mailbox with lam:
lam Other\\ Users/misteruser
This shows output such as this:
misteruser lrswipcda
-
Create a full control ACL for the appleadmin user with this command:
sam Other\\ Users/misteruser appleadmin lrswipcda
-
Verify the new ACL has been created:
lam Other\\ Users/misteruser
This shows output such as this:
misteruser lrswipcda
appleadmin lrswipcda
-
Delete misteruser's mailbox:
dm Other\\ Users/misteruser
- Verify that it's deleted:
lm *misteruser*