Chapter 1
Messaging Server Command-line Utilities
iPlanet Messaging Server 5.0 provides a set of command-line utilities in addition to its graphical user interface. This chapter describes utilities for messaging server starting, stopping, administration, message access, and message store.
For descriptions of the command-line utilities for the MTA, see Chapter 2 "Message Transfer Agent Command-line Utilities." For descriptions of the iPlanet Delegated Administrator for Messaging command-line utilities, see Chapter 3 "Delegated Administrator Command-line Utilities."
The commands described in this chapter are listed in Table 1-1.
Table 1-1    Messaging Server Commands
|
Command
|
Description
|
|
configutil
|
Enables you to list and change Messaging Server configuration parameters.
|
|
counterutil
|
Displays all counters in a counter object. Monitors a counter object.
|
|
deliver
|
Delivers mail directly to the message store accessible by IMAP or POP mail clients.
|
|
hashdir
|
Identifies the directory that contains the message store for a particular account.
|
|
imsasm
|
Handles the saving and recovering of user mailboxes.
|
|
imsbackup
|
Backs up stored messages.
|
|
imsrestore
|
Restores messages from the backup device into the message store.
|
|
imscripter
|
The IMAP server protocol scripting tool. Executes a command or sequence of commands.
|
|
mboxutil
|
Lists, creates, deletes, renames, or moves mailboxes (folders).
|
|
mkbackupdir
|
Creates and synchronizes the backup directory with the information in the message store.
|
|
MoveUser
|
Moves a user's account from one messaging server to another.
|
|
readership
|
Reports on how many users other than the mailbox owner have read messages in a shared IMAP folder.
|
|
reconstruct
|
Rebuilds one or more mailboxes, or the master mailbox file, and repairs any inconsistencies.
|
|
start-msg
|
Starts the messaging server processes.
|
|
stop-msg
|
Stops the messaging server processes.
|
|
stored
|
Performs cleanup and expiration operations.
|
Command Descriptions
This section describes what the main iPlanet Messaging Server command-line utilities do, defines their syntax, and provides examples of how they are used. The utilities are listed in alphabetical order.
configutil
The configutil utility enables you to list and change iPlanet Messaging Server 5.0 configuration parameters.
For a list of all configuration parameters, see Chapter 4 "Messaging Server Configuration."
Most iPlanet Messaging Server 5.0 configuration parameters and values are stored in the LDAP database on Directory Server with the remaining parameters and values stored locally in the msg.conf and local.conf files. The startup parameters are stored in the msg.conf file and are set during installation. The and local.conf files should not be edited manually. Use configutil to edit the parameters stored in those files.
|
Note
|
If the administrator has defined any language-specific options (such as messages), you must use the language option at the end of the command in order to list or change them. Commands entered without a language option are only applied to attributes that do not have a specified language parameter.
|
Requirements: Must be run locally on the Messaging server.
Location: server-root/bin/msg/admin/bin
You can use configutil to perform four tasks:
Display particular configuration parameters using -o option.
Add ;lang-xx after the option to list parameters with a specified language parameter. For example, ;lang-jp to list options specified for the Japanese language.
List configuration parameter values using the -e, -l, or -p prefix options.
Use -e to include configuration parameters with empty values in the list.
Use -l to just list local configuration parameters from the server's local configuration file.
Use -p prefix to just list those configuration parameters whose names begin with the letters specified in prefix.
Set configuration parameters using the -o option and -v value options.
Include the -l option with -o option and -v value to store the new value in the server's local configuration file.
To read the actual value from stdin, specify a dash (-) as the value on the command line.
Add ;lang-xx after the option to set options for a specified language parameter. For example, ;lang-jp to set options specified for the Japanese language.
Import configuration parameter values from stdin using the -i option.
Include the -e option with the -i option to import configuration parameters even if the value of the configuration option is empty.
Include the -l option with the -i option to import all configuration parameters to the server's local configuration file.
Syntax
|
configutil [-f configdbfile] [command-options] [;language]
|
configutil -i < inputfile
|
|
Options
The options for this command are:
|
Option
|
Description
|
|
-e
|
Lists configuration parameters that do not have values specified. May be used with the -l, -p, and -i options.
|
|
-f configdbfile
|
Enables you to specify a local configuration file other than the default. (This option uses information stored in the CONFIGROOT environment variable by default.)
|
|
-i < inputfile
|
Imports configurations from a file. Data in the file to be entered in option|value format with no spaces on either side of the pipe. If you use -e with -i, and specify an option without a value, any existing value for that option is deleted. (If you do not use -e, when you specify an option without a value, no change is made to any existing value for that option.)
Note that a UNIX command line like cat inputfile | configutil -i is not valid syntax.
|
|
-l option
|
Lists configuration parameters stored in the local server configuration file. When used in conjunction with the -v option, specifies that a configuration parameter value be stored in the local server configuration file.
|
|
-o option
|
Specifies the name of the configuration parameter that you wish to view or modify. May be used with the -l and -i options. Configuration parameter names starting with the word local are stored in the local server configuration file.
|
|
-p prefix
|
Lists configuration parameters with the specified prefix.
|
|
-v value
|
Specifies a value for a configuration parameter. To be used with -o option. If the -l option is also specified or the configuration parameter name specified with the -o option begins with local, the option value is automatically stored in the local server configuration file rather than the Directory Server.
|
If you specify no command-line options, all configuration parameters are listed.
Examples
To list all configuration parameter and their values in the both the Directory Server LDAP database and local server configuration file:
To import configurations from an input file named config.cfg:
|
configutil -i < config.cfg
|
|
To list all configuration parameters with the prefix service.imap:
|
configutil -p service.imap
|
|
To list all configuration parameters with the prefix service.imap, including those with empty values:
|
configutil -e -p service.imap
|
|
To display the value of the service.smtp.port configuration parameter:
|
configutil -o service.smtp.port
|
|
To set the value of the service.smtp.port configuration parameter to 25:
|
configutil -o service.smtp.port -v 25
|
|
To clear the value for the service.imap.banner configuration parameter:
|
configutil -o service.imap.banner -v ""
|
|
Language Specific Options
To list or set options for a specific language, append ;lang-xx immediately after the option with no spaces, where xx is the two-letter language identifier. For example, to view the text of the Japanese version of the store.quotaexceededmsg message:
|
configutil -o "store.quotaexceededmsg;lang-jp"
|
|
counterutil
The counterutil utility displays and changes counters in a counter object. It can also be used to monitor a counter object every 5 seconds.
Requirements: Must be run locally on the Messaging server.
Location: server-root/bin/msg/admin/bin
Syntax
|
counterutil -o counterobject [-i interval] [-l] [-n numiterations]
[-r registryname]
|
|
Options
The options for this command are:
|
Option
|
Description
|
|
-i interval
|
Specifies, in seconds, the interval between reports. The default is 5.
|
|
-l
|
Lists the available counters in the registry specified by the -r option.
|
|
-n numiterations
|
Specifies the number of iterations. The default is infinity.
|
|
-o counterobject
|
Continuously display the contents of a particular counter object every 5 seconds.
|
|
-r registryname
|
Indicates the counter registry to use. If no registryname is specified with the -r registryname option, the default is server-root/msg-instance/counter/counter.
|
Examples
To list all counter objects in a given server's counter registry:
To display the content of a counter object imapstat every 5 seconds:
|
counterutil -o imapstat -r \
server-root/msg-instance/counter/counter
|
|
deliver
The deliver utility delivers mail directly to the message store accessible by IMAP or POP mail clients.
If you are administering an integrated messaging environment, you can use this utility to deliver mail from another MTA, a sendmail MTA for example, to the Messaging Server message store.
Requirements: Must be run locally on the Messaging Server; the stored utility must also be running.
Location on UNIX: server-root/bin/msg/store/bin
Syntax
|
deliver [-l] [-c] [-d] [-r address] [-f address] [-m mailbox] [-a authid]
[-q] [-g flag] [userid]
|
|
Options
The options for this command are:
|
Option
|
Description
|
|
-a authid
|
Specifies the authorization ID of the sender. Defaults to anonymous.
|
|
-c
|
Automatically creates the mailbox if it doesn't exist in the message store.
|
|
-d
|
This option is recognized by deliver in order to maintain compatibility with /bin/mail, but it is ignored by deliver.
|
|
-g flag
|
Sets the system flag or keyword flag on the delivered message.
|
|
-f address
|
Inserts a forwarding path header containing address.
|
|
-l
|
Accepts messages using the LMTP protocol (RFC 2033).
|
|
-m mailbox
|
Delivers mail to mailbox.
If any user ids are specified, attempts to deliver mail to mailbox for each user id. If the access control on a mailbox does not grant the sender the "p" right or if the -m option is not specified, then this option delivers mail to the inbox for the user ID, regardless of the access control on the inbox.
If no user ids are specified, this option attempts to deliver mail to mailbox. If the access control on a mailbox does not grant the sender the "p" right, the delivery fails.
|
|
-q
|
Overrides mailbox quotas. Delivers messages even when the receiving mailbox is over quota.
|
|
-r address
|
Inserts a Return-Path: header containing address.
|
|
userid
|
Deliver to inbox the user specified by userid.
|
If you specify no options, mail is delivered to the inbox.
Examples
To deliver the contents of a file named message.list to Fred's tasks mailbox:
|
deliver -m tasks fred < message.list
|
|
In the above example, if the tasks mailbox does not grant "p" rights to the sender, the contents of message.list are delivered to the inbox of the user fred.
hashdir
The hashdir command identifies the directory that contains the message store for a particular account. This utility reports the relative path to the message store. The path is relative to the directory level just before the one based on the user ID. hashdir sends the path information to standard output.
Requirements: Must be run locally on the messaging server.
Syntax
|
hashdir [-a] [-i] account_name
|
|
Options
The options for this command are:
|
Option
|
Description
|
|
-a
|
Appends the directory name to the output.
|
|
-i
|
Allows you to use the command in interactive mode.
|
Examples
imsasm
The imsasm utility is an external ASM (Application Specific Module) that handles the saving and recovering of user mailboxes. imsasm invokes the imsbackup and imsrestore utilities to create and interpret a data stream.
During a save operation imsasm creates a save record for each mailbox or folder in its argument list. The data associated with each file or directory is generated by running the imsbackup or imsrestore command on the user's mailbox.
Syntax
|
imsasm [standard_asm_arguments]
|
|
Options
The options used in the imsasm utility are also known as standard-asm-arguments.
Either -s (saving), -r (recovering), or -c (comparing) must be specified and must precede any other options. When saving, at least one path argument must be specified. path may be either a directory or filename.
The following options are valid for all modes:
|
Option
|
Description
|
|
-n
|
Performs a dry run. When saving, walk the file system but don't attempt to open files and produce the save stream. When recovering or comparing, consume the input save stream and do basic sanity checks, but do not actually create any directories or files when recovering or do the work of comparing the actual file data.
|
|
-v
|
Turns on verbose mode. The current ASM, its arguments, and the file it is processing are displayed. When a filtering ASM operating in filtering mode (that is, processing another ASM's save stream) modifies the stream, its name, arguments, and the current file are displayed within square brackets.
|
When saving (-s), the following options may also be used:
|
Option
|
Description
|
-b
|
Produces a byte count. This option is like the -n option, but byte count mode will estimate the amount of data that would be produced instead of actually reading file data so it is faster but less accurate than the -n option. Byte count mode produces three numbers: the number of records, i.e., files and directories; the number of bytes of header information; and the approximate number of bytes of file data. Byte count mode does not produce a save stream so its output cannot be used as input to another asm in recover mode.
|
|
-o
|
Produces an "old style" save stream that can be handled by older NetWorker servers.
|
|
-e
|
Do not generate the final "end of save stream" boolean. This flag should only be used when an ASM invokes an external ASM and as an optimization chooses not to consume the generated save stream itself.
|
|
-i
|
Ignores all save directives from .nsr directive files found in the directory tree.
|
|
-f proto
|
Specifies the location of a .nsr directive file to interpret before processing any files. Within the directive file specified by proto, path directives must resolve to files within the directory tree being processed, otherwise their subsequent directives will be ignored.
|
|
-p ppath
|
Prepends this string to each file's name as it is output. This argument is used internally when one ASM executes another external ASM. ppath must be a properly formatted path which is either the current working directory or a trailing component of the current working directory.
|
|
-t date
|
The date after which files must have been modified before they will be saved.
|
|
-x
|
Crosses file system boundaries. Normally, file system boundaries are not crossed during walking.
|
When recovering (-r), the following options may also be used:
|
Option
|
Description
|
|
-i response
|
Specifies the initial default overwrite response. Only one letter may be used. When the name of the file being recovered conflicts with an existing file, the user is prompted for overwrite permission. The default response, selected by pressing Return, is displayed within square brackets. Unless otherwise specified with the -i option, n is the initial default overwrite response. Each time a response other than the default is selected, the new response becomes the default. When either N, R, or Y is specified, no prompting is done (except when auto-renaming files that already end with the rename suffix) and each subsequent conflict is resolved as if the corresponding lower case letter had been selected. The valid overwrite responses and their meanings are:
nDo not recover the current file.
NDo not recover any files with conflicting names.
yOverwrite the existing file with the recovered file.
YOverwrite files with conflicting names.
rRename the conflicting file. A dot "." and a suffix are appended to the recovered file's name. If a conflict still exists, the user will be prompted again.
RAutomatically renames conflicting files by appending a dog "." and a suffix. If a conflicting file name already ends in a .suffix, the user will be prompted to avoid potential auto rename looping conditions.
|
|
-m src=dst
|
Maps the file names that will be created. Any files that start exactly with src will be mapped to have the path of dst replacing the leading src component of the path name. This option is useful if you wish to perform relocation of the recovered files that were saved using absolute path names into an alternate directory.
|
|
-z suffix
|
Specifies the suffix to append when renaming conflicting files. The default suffix is R.
|
|
path
|
Restricts the files being recovered. Only files with prefixes matching path will be recovered. This checking is performed before any potential name mapping is done with the -m option. When path is not specified, no checking is performed.
|
Examples
To use imsasm to save the mailbox INBOX for user joe, the system administrator creates a directory file ADM_ROOT/backup/DEFAULT/joe/.nsr with the following contents:
This causes the mailbox to be saved using imsasm. Executing the mkbackupdir utility will automatically create the .nsr file. See mkbackupdir.
imsbackup
The imsbackup utility is used to write selected contents of the message store to any serial device, including magnetic tape, a UNIX pipe, or a plain file. The backup or selected parts of the backup may later be recovered via the imsrestore utility. The imsbackup utility provides a basic backup facility similar to the UNIX tar command.
Location: server-root/bin/msg/store/bin
Syntax
|
imsbackup [-a userid] [-b blocking_factor] [-f device]
[-d datetime] [-i] [-l] [-u file] [-v] path
|
|
Options
The options for this command are:
|
Option
|
Description
|
|
-a userid
|
Authenticates the specified user.
|
|
-b blocking_factor
|
Everything written to the backup device is performed by blocks of the size 512xblocking_factor. The default is 20.
|
|
-d datetime
|
Date from which messages are to be backed up, expressed in yyyymmdd[:hhmmss]; for example, -d 19990501:13100 would backup messages stored from May 1, 1999 at 1:10 pm to the present. The default is to backup all the messages regardless of their dates.
|
|
-f device
|
Specifies the file name to which the backup is written. If -f is not specified, imsbackup writes to stdout.
|
|
-i
|
Ignore links. Used for POP store.
|
|
-l
|
Autoloads the backup object.
|
|
-u file
|
Specifies the object name file to back up.
|
|
-v
|
Executes the command in verbose mode.
|
|
path
|
Path or path names to be backed up. You must specify the backup path in one of the following formats:
/msg_store/group/user/mailbox
/msg_store/group/user
/msg_store/group
/msg_store
|
Examples
The following example backs up user1 to /dev/rmt/0:
|
imsbackup -f /dev/rmt/0 /mystore/ALL/user1
|
|
The following example backs up all users under groupA
|
imsbackup /mystore/groupA
|
|
The following example performs a full backup of mystore:
imsrestore
The imsrestore utility restores messages from the backup device into the message store.
Location: server_root/bin/msg/store/bin
Syntax
|
imsrestore [-a userid] [-b blocking_factor] [-c [y | n]]
[-f device] [-h] [-i] [-m file] [-n] [-t] [-u file]
[-v] path
|
|
Options
The options for this command are:
|
Option
|
Description
|
|
-a userid
|
Authenticates the specified user.
|
|
-b blocking_factor
|
Indicates the blocking factor. Everything read on the device is performed by blocks of the size 512 x blocking_factor. The default is 20. Note: this number needs to be the same blocking factor that was used for the backup.
|
|
-c [y | n]
|
Answer yes or no to the question "Do you want to continue?"
|
|
-f file
|
Specifies the file name from which the backup data will be read. If -f is not specified, imsrestore reads from stdin.
|
|
-h
|
Dumps the header.
|
|
-i
|
Ignores existing messages. Does not check for existing messages before restore.
|
|
-m file
|
Specifies the user name mapping file. This is used when renaming user ids.
|
|
-n
|
Creates a new mailbox with a .date extension (if the mailbox exists). By default, messages are appended to the existing mailbox.
|
|
-t
|
Prints a table of contents, but restore is not performed.
|
|
-u file
|
Specifies the name of the object file to restore.
|
|
-v
|
Executes the command in verbose mode.
|
|
path
|
Path or path names to be restored. You must specify the path in one of the following formats:
/msg_store/group/user/mailbox
/msg_store/group/user
/msg_store/group
/msg_store
|
Examples
The following example restores the messages from the file backupfile:
The following example restores the messages for user1 from the file backupfile:
|
imsrestore -f backupfile /mystore/ALL/user1
|
|
imscripter
The imscripter utility connects to an IMAP server and executes a command or a sequence of commands.
Requirements: May be run remotely.
Location: server-root/bin/msg/admin/bin
Syntax
|
imscripter [-h] [-f script | [-c command] -f datafile]] [-c command] [-s
serverid | -p port | -u userid | -x passwd | -v verbosity]
|
|
Options
The options for this utility are:
|
Option
|
Description
|
|
-c command
|
Executes command, which can be one of the following:
create mailbox delete mailbox rename oldmailbox newmailbox [partition] getacl mailbox setacl mailbox userid rights deleteacl mailbox userid
If one or more of the above variables are included, the option executes the given command with that input. For example, create lincoln creates a mailbox for the user lincoln. If the -f file option is used, the option executes the command on each variable listed in the file.
|
|
-f file
|
The file may contain one or more commands, or a list of mailboxes on which commands are to be executed.
|
|
-h
|
Displays help for this command.
|
|
-p port
|
Connects to the given port. The default is 143.
|
|
-s server
|
Connects to the given server. The default is localhost. The server can be either a host name or an IP address.
|
|
-u userid
|
Connects as userid.
|
|
-v verbosity
|
String containing options for printing various information. The options are as follows:
EShow errors IShow informational messages PShow prompts CShow input commands cShow protocol commands BShow BAD or NO untagged responses OShow other untagged responses bShow BAD or NO completion results oShow OK completion results AShow all of the above
The letters designating options can be entered in any order. The default is EPBibo.
|
|
-x passwd
|
Uses this password.
|
mboxutil
The mboxutil command lists, creates, deletes, renames, or moves mailboxes (folders). mboxutil can also be used to report quota information.
You must specify mailbox names in the following format:
user/userid/mailbox
userid is the user that owns the mailbox and mailbox is the name of the mailbox.
Requirements: Must be run locally on the messaging server; the stored utility must also be running.
Location: server_root/bin/msg/admin/bin
Syntax
|
mboxutil [-a] [-c mailbox] [-d mailbox] [-g group]
[-r oldname newname [partition]] [-l] [-p pattern] [-q domain] [-x]
[-k mailbox cmd] [-u [userid]]
|
|
Options
The options for this command are:
|
Option
|
Description
|
|
-a
|
Lists all user quota information.
|
|
-c mailbox
|
Creates the specified mailbox.
|
|
-d mailbox
|
Deletes the specified mailbox.
|
|
-g group
|
Lists quota information for the specified group.
|
|
-k mailbox cmd
|
Locks the specified mailbox at the folder level; runs the specified command; after command completes, unlocks the mailbox.
When a mailbox is locked the owner can view the messages it contains, but no new messages can be added and no existing messages can be deleted or moved. You should use the -k option before performing backups, for example.
|
|
-l
|
Lists all of the mailboxes on a server.
|
|
-p pattern
|
When used in conjunction with the -l option, lists only those mailboxes with names that match pattern. You can use IMAP wildcards.
|
|
-q domain
|
Lists quota information for the specified 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.
Note that you cannot rename a user's INBOX. Nor can you use mboxutil -r to move mail stored under one user ID to another user ID.
|
|
-u [userid]
|
Lists user information such as current size or message store, quota (if one has been set), and percentage of quota currently in use.
|
|
-x
|
When used in conjunction with the -l option, displays the path and access control for a mailbox.
|
Examples
To list all mailboxes for all users:
To list all mailboxes and also include path and acl information:
To create the default mailbox named INBOX for the user daphne:
|
mboxutil -c user/daphne/INBOX
|
|
To delete a mail folder named projx for the user delilah:
|
mboxutil -d user/delilah/projx
|
|
To delete the default mailbox named INBOX and all mail folders for the user druscilla:
|
mboxutil -d user/druscilla/INBOX
|
|
To rename Desdemona's mail folder from memos to memos-april:
|
mboxutil -r user/desdemona/memos user/desdemona/memos-april
|
|
To lock a mail folder named legal for the user dulcinea:
|
mboxutil -k user/dulcinea/legal cmd
|
|
where cmd is the command you wish to run on the locked mail folder.
To move the mail account for the user dimitria to a new partition:
|
mboxutil -r user/dimitria/INBOX user/dimitria/INBOX partition
|
|
where partition specifies the name of the new partition.
To move the mail folder named personal for the user dimitria to a new partition:
|
mboxutil -r user/dimitria/personal user/dimitria/personal \
partition
|
|
To list usage statistics:
|
mboxutil -u daphne
diskquota size(K) %use msgquota msgs %use user
10240 297 no quota 953 29% daphne
|
|
mkbackupdir
The mkbackupdir utility creates and synchronizes the backup directory with the information in the message store. It is used in conjunction with Solstice Backup (Legato Networker). The backup directory is an image of the message store. It does not contain the actual data. mkbackupdir scans the message store's user directory, compares it with the backup directory, and updates the backup directory with the new user names and mailbox names under the message store's user directory.
The backup directory is created to contain the information necessary for Networker to backup the message store at different levels (server, group, user, and mailbox). Figure 1-1 displays the structure.
Figure 1-1    Backup directory hierarchy
Location: server_root/bin/msg/store/bin
The variables in the backup directory contents are:
|
Variable
|
Description
|
|
BACKUP_ROOT
|
Message store administrator root directory as specified in the ims.cnf file. The default directory is server_root/msg-instance.
|
|
group
|
System administrator-defined directories containing user directories. Breaking your message store into groups of user directories allows you to do concurrent backups of groups of user mailboxes.
To create groups automatically, specify your groups in the server_root/msg-instance/config/backup-groups.conf file. The format for specifying groups is:
groupname= pattern
groupname is the name of the directory under which the user and mailbox directories will be stored, and pattern is a regex expression specifying user directory names that will go under the groupname directory.
|
|
user
|
Name of the message store user.
|
|
folder
|
Name of the user mailbox directory.
|
|
mailbox
|
Name of the user mailbox.
|
The mkbackupdir utility creates:
A default group directory (ALL) or the group directories defined in the backup-groups.conf configuration file. The following is a sample backup-groups.conf file:
|
groupA=a*
groupB=b*
groupC=c*
.
.
.
|
|
A user directory under the backup directory for each new user in the message store.
A 0 length mailbox file for each mailbox.
A .nsr file for each subdirectory that contains user mailboxes.
The .nsr file is the NSR configuration file that informs the Networker to invoke imsasm. imsasm then creates and interprets the data stream.
Each user mailbox contains files of zero length. This includes the INBOX, which is located under the user directory.
Syntax
|
mkbackupdir [-a userid] [-i | -f] [-p directory] [-v]
|
|
Options
The options for this command are:
|
Option
|
Description
|
|
-a userid
|
Authenticates the specified user.
|
|
-f
|
Backs up the folders only. By default, all mailboxes are backed up.
|
|
-i
|
Backs up the inbox only. By default, all mailboxes are backed up.
|
|
-p directory
|
Specifies an alternative directory for the backup image (the default directory is msg-instance/backup)
|
|
-v
|
Executes the command in verbose mode.
|
Examples
To create the server_root/msg-instance/backup directory, enter the following:
MoveUser
The MoveUser utility moves a user's account from one messaging server to another. When user accounts are moved from one messaging server to another, it is also necessary to move the user's mailboxes and the messages they contain from one server to the other. In addition to moving mailboxes from one server to another, MoveUser updates entries in the directory server to reflect the user's new mailhost name and message store path.
Requirements: May be run remotely.
Location: server-root/bin/msg/admin/bin
Syntax
|
MoveUser -s srcmailhost[:port] -x proxyuser -p password -d destmailhost[:port]
[-u uid | -u uid -U newuid] [-l ldapURL -D binDN -w password] [options]
|
|
Options
The options for this command are:
|
Option
|
Description
|
|
-a destproxyuser
|
ProxyAuth user for destination messaging server.
|
|
-A
|
Do not add an alternate email address to the LDAP entry.
|
|
-d destmailhost
|
Destination messaging server.
By default, MoveUser assumes IMAP port 143. To specify a different port, add a semi-colon and the port number after destmailhost. For example, to specify port 150 for myhost, you would enter:
-d myhost:150
|
|
-D binddn
|
Binding dn to the given ldapURL.
|
|
-F
|
Delete messages in source messaging server after successful move of mailbox. (If not specified, messages will be left in source messaging server.)
|
|
-h
|
Display help for this command.
|
|
-l ldapURL
|
URL to establish a connection with the Directory Server:
ldap://hostname:port/base_dn?attributes?scope?filter
For more information about specifying an LDAP URL, see your Directory Server documentation.
Cannot be used with the -u option.
|
|
-L
|
Add a license for Messaging Server if not already set.
|
|
-m destmaildrop
|
Message store path for destination messaging server. (If not specified, the default is used.)
|
|
-n msgcount
|
Number of messages to be moved at once.
|
|
-o srcmaildrop
|
Message store path for source messaging server. (If not specified, the default is used.)
|
|
-p srcproxypasswd
|
ProxyAuth password for source messaging server.
|
|
-s srcmailhost
|
Source messaging server.
By default, MoveUser assumes IMAP port 143. To specify a different port, add a semi-colon and the port number after srcmailhost. For example, to specify port 150 for myhost, you would enter:
-s myhost:150.
|
|
-S
|
Do not set new message store path for each user.
|
|
-u uid
|
User ID for the user mailbox that is to be moved. Cannot be used with -l option.
|
|
-U newuid
|
New (renamed) user ID that the mailbox is to be moved to. Must be used with -u uid, where -u uid, identifies the old user name that is to be discontinued. Both the old and the new user ID must currently exist on both the source and the destination mailhost. After migration you are free to manually remove the original user ID from LDAP if you wish to do so.
|
|
-v destproxypwd
|
ProxyAuth password for destination messaging server.
|
|
-w bindpasswd
|
Binding password for the binddn given in the -D option.
|
|
-x srcproxyuser
|
ProxyAuth user for source messaging server.
|
Examples
To move all users from host1 to host2, based on account information in the Directory Server siroe.com:
|
MoveUser -l \
"ldap://siroe.com:389/o=siroe.com???(mailhost=host1.domain.com)" \
-D "cn=Directory Manager" -w password -s host1 -x admin \
-p password -d host2 -a admin -v password
|
|
To move one user from host1 which uses port 150 to host2, based on account information in the Directory Server siroe.com:
|
MoveUser -l \
"ldap://siroe.com:389/o=siroe.com???(uid=userid)" \
-D "cn=Directory Manager" -w password -s host1:150 -x admin \
-p password -d host2 -a admin -v password
|
|
To move a group of users whose uid starts with letter `s' from host1 to host2, based on account information in the Directory Server server1.siroe.com:
|
MoveUser -l \
"ldap://server1.siroe.com:389/o=siroe.com???(uid=s*)" \
-D "cn=Directory Manager" -w password -s host1 -x admin \
-p password -d host2 -a admin -v password
|
|
To move a user's mailboxes from host1 to host2 when the user ID of admin is specified in the command line:
|
MoveUser -u uid -s host1 -x admin -p password -d host2 -a admin \
-v password
|
|
To move a user named aldonza from host1 to a new user ID named dulcinea on host2:
|
MoveUser -u aldonza -U dulcinea -s host1 -x admin -p password \
-d host2 -a admin -v password
|
|
readership
The readership utility reports on how many users other than the mailbox owner have read messages in a shared IMAP folder.
An owner of an IMAP folder may grant permission for others to read mail in the folder. A folder that others are allowed to access is called a shared folder. Administrators can use the readership utility to see how many users other than the owner are accessing a shared folder.
The utility scans all mailboxes.
This utility produces one line of output per shared folder, reporting the number of readers followed by a space and the name of the mailbox.
Each reader is a distinct authentication identity that has selected the shared folder within the past specified number of days. Users are not counted as reading their own personal mailboxes. Personal mailboxes are not reported unless there is at least one reader other than the folder's owner.
Requirements: Must be run locally on the messaging server; the stored utility must also be running.
Location: server-root/bin/msg/admin/bin
Syntax
|
readership [-d days] [-p months]
|
|
Options
The options for this command are:
|
Option
|
Description
|
|
-d days
|
Counts as a reader any identity that has selected the shared IMAP folder within the indicated number of days. The default is 30.
|
|
-p months
|
Does not count users who have not selected the shared IMAP folder within the indicated number of months. The default is infinity and removes the seen flag data for those users. This option also removes the "seen" flag data for those users from the store.
|
reconstruct
The reconstruct utility rebuilds one or more mailboxes, or the master mailbox file, and repairs any inconsistencies. You can use this utility to recover from almost any form of data corruption in the message store.
Requirements: Must be run locally on the messaging server; the stored utility must also be running.
Location: server-root/bin/msg/admin/bin
|
Note
|
Low-level database repair, such as completing transactions and rolling back incomplete transactions is performed with stored -d.
|
Syntax
|
reconstruct [-f] [-p partition] [-r [mailbox [mailbox...]] [-m] [-n]
[-q] [-o [-d filename]]
|
|
Options
The options for this command are:
|
Option
|
Description
|
|
-f
|
Forces reconstruct to perform a fix on the mailbox or mailboxes.
|
|
-m
|
Performs a high-level consistency check and repair of the mailboxes database. This option examines every mailbox it finds in the spool area, adding or removing entries from the mailboxes database as appropriate. The utility prints a message to the standard output file whenever it adds or removes an entry from the database.
|
|
-n
|
Do not perform a fix on the mailbox or mailboxes.
|
|
-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, reconstruct writes the command:
mboxutil-d user/userid/INBOX
to the standard output.
|
|
-o -d filename
|
If -d filename is specified with the -o option, reconstruct opens the specified file and writes the mboxutil -d commands into that file. The file may then be turned into a script file to delete the orphaned accounts.
|
|
-p partition
|
Specifies a partition name. You can use this option on the first usage or reconstruct.
|
|
-q
|
Fixes any inconsistencies in the quota subsystem, such as mailboxes with the wrong quota root or quota roots with the wrong quota usage reported. The -q option can be run while other server processes are running.
|
|
-r [mailbox]
|
Performs a consistency check and repairs the partition area of the specified mailbox or mailboxes. The -r option also repairs all sub-mailboxes within the specified mailbox. If you specify -r with no mailbox argument, the utility repairs the spool areas of all mailboxes within the database.
|
The mailbox argument indicates the mailbox to be repaired. You can specify one or more mailboxes. Mailboxes are specified with names in the format user/userid/sub-mailbox. Where userid is the user that owns the mailbox. For example, the inbox of the user dulcinea is entered as: user/dulcinea/INBOX.
start-msg
The start-msg utility starts all of the messaging server processes (smtp, imap, pop, store, http), or optionally, one specified service.
Syntax
|
start-msg [smtp | imap | pop | store | http]
|
|
Examples
The following command starts all the messaging server processes:
The following command starts the imap process:
stop-msg
The stop-msg utility stops all messaging server processes (smtp, imap, pop, store, http), or optionally, one specified service.
Syntax
|
stop-msg [smtp | imap | pop | store | http]
|
|
Examples
The following command stops all messaging server processes:
The following command stops the http service:
stored
The stored utility performs the following functions:
Background and daily messaging tasks
Deadlock detection and rollback of deadlocked database transactions
Cleanup of temporary files on startup
Implementation of aging policies
Periodic monitoring of server state, disk space, service response times, and so on
Issuing of alarms if necessary
The stored utility automatically performs cleanup and expiration operations once a day at midnight. You can choose to run additional cleanup and expiration operations.
Requirements: Must be run locally on the Messaging Server.
Location: server-root/bin/msg/admin/bin
Syntax
To run stored from the command line to perform a specific operation:
|
stored [-1] [-c] [-n] [-v [-v]]
|
|
To run stored as a daemon process:
Options
The options for this command are:
|
Option
|
Description
|
|
-c
|
Performs one cleanup pass to erase expunged messages. Run once, then exits. The -c option is a one-time operation, so you do not need to specify the -1 option.
|
|
-d
|
Run as daemon. Performs system checks and activates alarms, deadlock detection, and database repair.
|
|
-1 (the number one)
|
Run once, then exit.
|
|
-n
|
Run in trial mode only. Does not actually age or cleanup messages. Runs once, then exits.
|
|
-v
|
Verbose output.
|
|
-v -v
|
More verbose output.
|
Examples
To test expiration policies:
To perform a single aging and cleanup pass: