Sun Java System Messaging Server 6 2005Q4 Administration Reference

Options

The options for this command are:

Option  

Description  

-a

Obsolete. Used to list all user quota information. Use. imquotacheck

-c mailbox

Creates the specified mailbox. 

A mailbox must exist before creating a secondary mailbox. 

-d mailbox

Deletes the specified mailbox. 

To delete a user from the message store, use the following value for -d mailbox:

user/userid/INBOX

For example, to delete the user john from the message store, use -d user/john/INBOX. To delete the mm folder in the user john’s mailbox, use -d user/john/mm.

The recommended method to delete a user is to mark the user status as deleted in the LDAP directory (by using the Delegated Administrator utility commadmin user delete command or the Delegated Administrator console.). Then, run msuserpurge to remove the mailboxes. Next, use the commadmin user purge command to purge the users that have been marked as deleted for a period longer than the specified number of days.

If you use the Delegated Administrator utility as described in the preceding paragraph, you do not have to use the mboxutil -d command to delete a mailbox.

Note that -p and -P can be used in conjunction with one another.

-e

Expunges all deleted messages in the message store. This option also can be used with the -p pattern or -P regexp options to expunge all deleted mailboxes with names that match pattern or regexp.

-f file

Specifies a file that stores mailbox names. The -f option can be used with the -c, -r, or -d options.

The file contains a list of mailboxes on which the mboxutil command is executed. The following is an example of entries in a data file:

user/daphne/INBOXuser/daphne/projxuser/daphne/mm

-l

Lists all of the mailboxes on a server. 

mboxutil -l will correctly display characters associated with the system locale under which mboxutil is being executed. The -P regexp option will accept international characters.

-o

Checks for orphaned accounts. This option searches for inboxes in the current messaging server host which do not have corresponding entries in LDAP. For example, the -o option finds inboxes of owners who have been deleted from LDAP or moved to a different server host. For each orphaned account it finds, mboxutil writes the following command to the standard output:

mboxutil-d user/userid/INBOX unless -w is specified

-p pattern

When used with the -l option, lists only those mailboxes with names that match pattern.

Can also be used with the -d or -e option to delete or expunge mailboxes with names that match pattern.

You can use IMAP wildcards. This option expects a pattern in IMAP M-UTF-7 format. This is not the recommended way to search for non ascii mailboxes. To search for non ascii mailboxes, use the -P option. 

-P regexp

Lists, deletes, or expunges only those mailboxes with names that match the specified POSIX regular expression. This option expects the regexp in the local character encoding.

-q domain

Obsolete. Use imquotacheck -d domain

-r oldname newname [partition]

Renames the mailbox from oldname to newname. To move a folder from one partition to another, specify the new partition with the partition option.

This option can be used to rename a user. For example, mboxutil -r user/user1/INBOX user/user2/INBOX moves all mail and mailboxes from user1 to user2, and new messages will appear in the new INBOX. (If user2 already exists, this operation will fail.)

-R mailbox

Restores deleted messages that have not yet been purged. 

When a mailbox is expunged or expired, the uids of the deleted messages are stored in a store.exp file. The messages are physically removed by imexpire after the cleanup age has passed. When expunge or expire is issued by mistake, this option can by used to restore the deleted messages that have not been purged by imexpire into the original mailbox.

-s

When used with the -l option, displays only the mailbox name. No other data is displayed.

-t num

Lists the mailboxes that have not been accessed in a specified number of days (num). The -t option must be used with the -o option, which identifies orphaned mailboxes.

Thus, the -t option identifies inactive mailboxes (based on last-accessed date) together with orphaned mailboxes (mailboxes that do not have corresponding user entries in the LDAP directory).

To identify (list) the orphaned and inactive mailboxes, use mboxutil -o -w file -t num.

To mark these orphaned and inactive mailboxes for deletion, use mboxutil -d -f file, where file is the same file as the one passed to -w in the preceding command.

To use this feature, the config variable local.enablelastaccess must be enabled for at least the number of days specified with the -t option.

-u user

Obsolete. Used to list user information. Use imquotacheck -u user

-w file

Used with the -o option. Writes to a file the mailbox names generated by the -o option (which identifies orphaned accounts).

-x

When used with the -l option, displays the path and access control for a mailbox.