You can schedule the msuserpurge command for execution with the configutil parameter local.sched.userpurge. For example:
configutil -o local.schedule.userpurge -v "30 2 * * 0 /opt/SUNWmsgsr/lib/msuserpurge -g 20"
In the preceding example, msuserpurge will run on Sundays at 2:30 a.m. It will remove the mailbox of every user entry marked for deletion longer than 20 days.
For information on scheduling msuserpurge and other tasks, see “To Schedule Automatic Tasks” in the chapter, “Configuring General Messaging Capabilities” in the Sun Java System Messaging Server Administration Guide.
The mboxutil -d command deletes a user from the message store. However, if you follow the above procedure using the Delegated Administrator utility, you do not have to use the mboxutil -d command to delete the user's mailbox. The msuserpurge command will have already done so.
If you are running Messaging Server 5.x, use the mboxutil -d command to delete a user's mailbox. The msuserpurge command is only available with Sun Java System Messaging Server 6.
The user running the msuserpurge and csclean utilities must have sufficient access to the directory to modify the LDAP entry of the user being deleted—specifically, to set the status of attributes such as mailUserStatus, icsStatus, and inetUserStatus.