Complete Contents
Chapter 1 Getting Started With Netscape Messaging Server
Chapter 2 Configuring IMAP and POP Services
Chapter 3 Configuring SMTP Services
Chapter 4 Managing Mail Users and Mailing Lists
Chapter 5 Managing the Message Store
Chapter 6 Security and Access Control
Chapter 7 Working With SMTP Plugins
Chapter 8 Filtering Unsolicited Bulk Email
Chapter 9 Message Routing
Chapter 10 Monitoring and Maintaining Your Server
Chapter 11 Logging and Log Analysis
Appendix A Command Line Utilities
Appendix B Program Delivery
Appendix C sendmail Migration and Compatibility
Appendix D SNMP MIB
Glossary
Messaging Server Administrator's Guide: Command-line Utilities
Previous Next Contents Index Bookshelf


Appendix A Command-line Utilities

Netscape Messaging Server 4.0 provides a set of command-line utilities in addition to its graphical user interface. This appendix describes utilities for Messaging Server installation, migration, starting, stopping, administration, message management, problem recovery, monitoring, and reporting.

Each command-line utility has a set of options. Please note that these options might change in future releases as product functionality evolves.

This appendix includes the following sections:

There is a separate set of utilities used to migrate from a Unix sendmail messaging environment to Netscape Messaging Server 4.0. The sendmail utilities are described in Appendix C. The Messaging Server Mail Multiplexor and Mailstone components also have their own set of utilities. Although these additional utilities are summarized in this appendix, complete syntax and usage guidelines are found with the description of that component or process.


Overview of Command-Line Utilities
This overview briefly describes all of the Netscape Messaging Server 4.0 command-line utilities. This section contains five tables:

  • Table A.1 groups the installation, message management, problem recovery, monitoring, and reporting utilities into categories according to their function and purpose.
  • Table A.2 describes the installation, message management, problem recovery, monitoring, and reporting utilities in alphabetical order. For complete information about each utility, see Messaging Server Utilities--Descriptions.
  • Table A.3 describes the sendmail migration utilities. For complete information on these utilities, see Appendix C.
  • Table A.4 describes the Mail Multiplexor utilities. For complete information on these utilities, see the Mail Multiplexor document.
  • Table A.5 describes the Mailstone utility programs. For complete information on these utilities, see the Mailstone document.

Table A.1 Command-line utilities by category

Category
Command-line Utilities
Installation and migration
MoveUser, qconvert, upgrade
Management
configutil, imscripter, mboxutil, NscpMsg, processq
Recovery
deliver, reconstruct
Background and daily tasks
stored
Monitoring and reporting
counterutil, hashdir, mailq, quota, readership

Table A.2 Command-line utilities and what they do

Command
What it does
configutil
Displays and makes changes to configuration information stored in the Directory Server or local configuration file.
counterutil
Displays all counters in a counter object. Monitors a counter object.
deliver
Delivers mail to a message store accessible by IMAP or POP.
hashdir
Identifies the directory that contains the message store for a particular user.
imscripter
The IMAP server protocol scripting tool. Executes a command or sequence of commands.
mailq
Checks the mail queue and reports the number of messages awaiting delivery.
mboxutil
Lists, creates, deletes, renames, or moves mailboxes.
MoveUser
Moves messages in a user's mailbox from one Messaging Server to another.
NscpMsg (Unix)
Starts and stops Messaging Server and runs recovery utilities.
processq
Manually delivers queued messages from the mail queue.
qconvert
Converts the Netscape Messaging Server 3.x message queue to the 4.0 format.
quota
Reports quota usage.
readership
Collects readership information on mailboxes.
reconstruct
Reconstructs mailboxes that have been damaged or corrupted.
stored
Performs background and daily tasks, expunges, and erases messages stored on disk.
upgrade
Converts Messaging Server mailboxes stored in 3.x format on a 3.x server to mailboxes in 4.0 format on a 4.0 server.

Table A.3 sendmail migration command-line utilities

Command
What it does
chkuniq
Checks the output files of the unix2ldif and ldifsplit utilities for duplicate entries. See Running the chkuniq Utility for details.
ldapmodify
Writes the contents of the converted, split, and checked LDIF files to the LDAP Directory. See Updating the LDAP Directory with ldapmodify for details.
ldifsplit
Takes the file of LDAP entries created by the unix2ldif utility and splits those entries into two groups: 1) LDAP entries that are already in the directory server (the DN already exists), and 2) LDAP entries that are not already in the directory server (no DN exists). See Running the ldifsplit Utility for details.
MigrateUnixSpool
Moves user messages from the user's sendmail spool file to the Messaging Server mailbox directory. See Running the MigrateUnixSpool Utility for details.
unix2ldif
Writes Unix sendmail user account data to an LDIF format file. See Running the unix2ldif Utility for details.

Table A.4 Mail Multiplexor utility programs

Command
What it does
mmp-setup (Unix)
Configures the Multiplexor for IMAP and POP services.
PopProxy (Unix)
PopProxy.exe (NT)

The executable Multiplexor programs for POP services.
ImapProxy (Unix)
ImapProxy.exe (NT)

The executable Multiplexor programs for IMAP services.
ImapMMP (Unix)
PopMMP (Unix)

Shell scripts that set environment variables and execute Multiplexor for IMAP and POP services, respectively.

Table A.5 Mailstone utility programs

Program
What it does
mailclient (Unix)
mailclient.exe (NT)

The principal Mailstone program--the one that talks to the mail server.
mailmaster (Unix)
The PERL script used to start all the mailclient instances and collect results.
create_accounts_ldif
create_broadcast_ldif

Script tools used to create test mail accounts.
loadclient (Unix)
A shell script that facilitates directly running the mailclient program.


Command-Line Utilities--General Information
This section provides general information about using Netscape Messaging Server 4.0 command-line utilities.

Tip: A note about internationalization: If these utilities do not work correctly in your native environment, check the setting of the LANG environment variable.

Messaging Server File Locations

Messaging Server files are located in the following locations:

Table A.6 Command-line utilities location

Location
Utilities
server-root/bin/msg/
admin/bin

configutil, counterutil, hashdir, imscripter, mboxutil, MoveUser, qconvert, quota, readership, reconstruct, upgrade
server-root/bin/msg/
store/bin

deliver, stored
/etc
NscpMsg

Location of Configuration Data

All user and group configuration information is stored on the LDAP Directory Server.

Most Messaging Server configuration data is also stored on the LDAP server. Some Messaging Server configuration information is stored in a local file named configdb on the Messaging Server. The configdb file contains the following kinds of configuration information:

The configdb file is located:

Usage Requirements

Most of the command-line utilities must be run locally on the messaging server. See the description of each utility for exceptions and command-specific login requirements.

Unix Login Requirements

In Unix environments, command-line utilities can only be run as root or as the login ID originally specified at the time of installation. By default, that is the mailsrv login ID. In other words, you have to log in as mailsrv to run these utilities.

Windows NT Login Requirements

In Windows NT environments, the default is that command-line utilities are run from the same account that is used to run services. By default, that is the Administrator account. Therefore, you must have administrator privileges to run most of the command-line utilities.


Messaging Server Utilities--Descriptions
This section describes what the main Netscape Messaging Server 4.0 command-line utilities do, defines their syntax, and gives examples of how they are used. The utilities are listed in alphabetical order.

configutil

The configutil utility enables you to list and change Messaging Server configuration options.

Most Messaging Server configuration options and values are stored in the LDAP database on the Directory Server with the remaining options and values stored locally on the Messaging Server in a file named configdb (see Location of Configuration Data for details).

configutil Syntax

configutil [-f configdbfile] [command-options]

Requirements: Must be run locally on the Messaging server.
Location: server-root/bin/msg/admin/bin

You can use configutil to perform four tasks:

Table A.7 configutil options

Option
Description
-e
Lists configuration options 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
Imports configurations from standard input. Data 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.)
-l option
Lists configuration options stored in the local server configuration file. When used in conjunction with the -v option, specifies that an configuration option value be stored in the local server configuration file.
-o option
Specifies the name of the configuration option that you wish to view or modify. May be used with the -l and -i options. Configuration option names starting with the word local are stored in the local server configuration file.
-p prefix
Lists configuration options with the specified prefix.
-v value
Specifies a value for a configuration option. To be used with -o option. If the -l option is also specified or the configuration option 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 options are listed.

Examples of Ways to Use configutil

To list all configuration options and their values in the both the Directory Server LDAP database and local server configuration file:

configutil

To list all configuration options with the prefix service.imap:

configutil -p service.imap

To list all configuration option 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 option:

configutil -o service.smtp.port

To set the value of the service.smtp.port configuration option to 25:

configutil -o service.smtp.port -v 25

To clear the value for the service.imap.banner configuration option:

configutil -o service.imap.banner -v ""

(See Alarm Attributes for information on using configutil to set alarm attributes.)

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.

counterutil Syntax

counterutil -o counterobject [-r registryname]

Requirements: Must be run locally on the Messaging server.
Location: server-root/bin/msg/admin/bin

Table A.8 counterutil options

Option
Description
-o counterobject
Continuously display the contents of a particular counter object every 5 seconds.
-r registryname
Indicates the counter registry to use. If no counter is specified with the -r registryname option, the default is server-root/msg-instance/counter/counter.

Examples of Ways to Use counterutil

To list all counter objects in a given server's counter registry:

counterutil

To display the content of 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.

deliver Syntax

deliver [-l] [-d] [-r address] [-f address] [-m mailbox] [-a authid] 
[-q] [-F
flag]...[userid]...

Requirements: Must be run locally on the Messaging server.
Location: server-root/bin/msg/store/bin

Table A.9 deliver options

Option
Description
-a authid
Specifies the authorization id of the sender. Defaults to anonymous.
-d
This option is recognized by deliver in order to maintain compatibility with /bin/mail, but it is ignored by deliver.
-F 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.
-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 of the user specified by userid.

If you specify no options, mail is delivered to the inbox.

Examples of Ways to Use deliver

To deliver the contents of a file named message.list to Fred's Tasks mailbox:

deliver -m tasks fred < message.list

In this 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 utility identifies the directory that contains the message store for a particular account. This utility reports the relative path to the message store, such as d1/a7/. The path is relative to the directory level just before the one based on the user ID. The utility sends the path information to the standard output.

hashdir Syntax

hashdir [-a] [-i] account_name

Requirements: Must be run locally on the Messaging server.
Location: server-root/bin/msg/admin/bin

Table A.10 hashdir options

Option
Description
-a
Appends the directory name to the output.
-i
Allows you to use the command in interactive mode.

imscripter

The imscripter utility connects to an IMAP server and executes a command or a sequence of commands.

imscripter Syntax

imscripter [-h] [-f script | [-c command] -f datafile]] [-c command] 
[-s
serverid | -p port | -u userid | -x passwd |-v verbosity]

Requirements: May be run remotely.
Location: server-root/bin/msg/admin/bin

Table A.11 imscripter options

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 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. The default is EPBibo (EBb if -f is specified.)

E - Show errors
I - Show informational messages
P - Show prompts
C - Show input commands
c - Show protocol commands
B - Show BAD or NO untagged responses
O - Show other untagged responses
b - Show BAD or NO completion results
o - Show OK completion results
A - Show all of the above

The letters designating options can be entered in any order.

-x passwd
Uses this password.

imscripter File Formats

Data files used with the -f option have to be formatted as a list of mailboxes with fully qualified paths, one mailbox per line. For example:

shared folders/indira/INBOX
shared folders/makeba/INBOX
shared folders/vladmir/INBOX

Scripts used with the -f option have to be in the following format:

command options

For example, an imscripter script file that adds the mailboxes contained in a file named add.list, and deletes mailboxes contained in a file named delete.list, looks like this:

create -f add.list
delete -f delete.list

Suppose the example file shown above is named dothis.script. To run it showing only errors, input commands, BAD and NO untagged and completion responses, enter:

imscripter -v ECBb -f dothis.script. 

Examples of Ways to Use imscripter

To run imscripter in interactive mode:

imscripter [options]

In interactive mode, each command is entered one line at a time at the imscripter prompt. The command is then executed and responses displayed.

To execute the commands specified in a script file:

imscripter [options] -f script 

To execute a specific command on mailbox:

imscripter [options] [-l] -c command mailbox

To execute a specific command for each line of data in a data file:

imscripter [options] -c command -f datafile

To execute commands from the specified script file:

imscripter -s username.airius.com -f script

mailq

The mailq utility checks and reports on the mail queue of messages awaiting delivery.

mailq Syntax

mailq [-v]

Requirements: Must be locally run on the server.
Location: /bin/mailq

Table A.12 mailq options

Option
Description
-v
Provides more verbose information about the queue.

mailq Examples

To check the mail queue, type mailq at a command prompt. If there are no queued messages, that fact will be reported:

% mailq
Mail queue is empty.

If there are queued messages, each host that has queued messages waiting to be delivered will be listed, along with the number of pending deliveries. For example, output might look like this:

% mailq
Queued Messages Destination Host
--------------- ----------------
2 math.marsu.edu
3 universal-robots.com

In the example above, five messages are waiting for delivery. Delivering all of them should require two connections to other machines because the messaging server attempts to deliver all queued mail for a host before disconnecting.

See processq for information how to manually force immediate delivery of messages in the mail queue.

mboxutil

The mboxutil utility lists, creates, deletes, renames, or moves mailboxes (folders).

mboxutil Syntax

mboxutil [-c mailbox] [-d mailbox] [-r oldname newname [partition]]
[-l] [-p
pattern] [-x]

Requirements: Must be run locally on the Messaging server.
Location: server-root/bin/msg/admin/bin

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 desdemona is entered as: user/desdemona/INBOX.

Table A.13 mboxutil options

Option
Description
-c mailbox
Creates the specified mailbox.
-d mailbox
Deletes the specified mailbox.
-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 begin with the letters specified by pattern. You can use IMAP wildcards.
-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.
-x
When used in conjunction with the -l option, shows the path and access control for a mailbox.

Examples of Ways to Use mboxutil

To list mailboxes:

mboxutil -l 

To list all folders and also include path and acl information:

mboxutil -l -x 

To create a mailbox named INBOX for the user druscilla:

mboxutil -c user/druscilla/INBOX

To delete a mailbox named INBOX for the user delilah:

mboxutil -d user/delilah/INBOX

To rename Daphne's mailbox from memos to memos-april:

mboxutil -r user/daphne/memos user/daphne/memos-april

MoveUser

The MoveUser utility moves a user's account from one mail server to another. When user accounts are moved from one mail server to another, it's 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.

MoveUser Syntax

MoveUser -s srcmailhost -x proxyuser -p password
[-u uid] [-l ldapURL -D bindDN -w password] -d destmailhost [options]

Requirements: May be run remotely.
Location: server-root/bin/msg/admin/bin

Table A.14 MoveUser options

Option
Description
-a destproxyuser
ProxyAuth user for destination mail server.
-A
Do not add an alternate email address to the ldap entry.
-d destmailhost
Destination mail server.
-D binddn
Binding dn to the given ldapURL.
-F
Delete messages in source mail server after successful move of mailbox. (If not specified, messages will be left in source mail 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 mail 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 mail server. (If not specified, the default is used.)
-p srcproxypasswd
ProxyAuth password for source mail server.
-s srcmailhost
Source mail server.
-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.
-v destproxypwd
ProxyAuth password for destination mail server.
-w bindpasswd
Binding password for the binddn given in the -D option.
-x srcproxyuser
ProxyAuth user for source mail server.

Examples of Ways to Use MoveUser

To move all users from host1 to host2, based on account information in the Directory Server airius.com:

MoveUser -l
"ldap://airius.com:389/o=Airius.com???(objectclass=mailrecipient)"
-D "cn=Directory Manager" -w password -s host1 -x admin -p password
-d host2 -a admin -v password

To move one user from host1 to host2, based on account information in the Directory Server airius.com:

MoveUser -l 
"ldap://airius.com:389/o=Airius.com???(uid=userid)"
-D "cn=Directory Manager" -w password -s host1 -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.airius.com:

MoveUser -l 
"ldap://server1.airius.com:389/o=Airius.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 is specified in the command line:

MoveUser -u 
uid -s host1 admin -p password
-d host2 -x admin -v password -o /var/mail/spool/mailbox
-m /usr/netscape/suitespot4/msg-airius/store/partition/primary

NscpMsg

The NscpMsg utility starts, stops, and refreshes the Messaging Server services. This utility is only available in Unix environments.

NscpMsg Syntax

/etc/NscpMsg start [imap | pop | smtp | store]
/etc/NscpMsg stop [imap | pop | smtp | store]
/etc/NscpMsg refresh [imap | pop | smtp | store]

Requirements: Must be run as root locally on the Messaging server.

Location: /etc
server-root/bin/msg/admin/bin

The NscpMsg utility sets the CONFIGROOT and LD_LIBRARY_PATH environment variables for the commands it runs.

NscpMsg is similar to the /etc/NscpMail utility supplied with Messaging Server 3.x.

Table A.15 NscpMsg options

Option
Description
refresh
Refresh mail server processes.
start
Starts all mail server processes (stored, smtpd, popd, imapd), or optionally, one specified service.
stop
Stops all mail server processes (stored, smtpd, popd, imapd), or optionally, one specified service.

processq

The processq utility immediately delivers messages in the deferred queue.

processq Syntax

processq [[-R]hostname]

Requirements: Must be locally run on the server.
Location: /usr/lib

Table A.16 processq options

Option
Description
hostname
Deliver mail addressed to hostname. The hostname can be the full name of the host as reported by mailq, or any pattern contained in the name. If the pattern matches more than one hostname, each match will have its queue processed.
-R
Specify a specific domain.

The deferred queue is automatically processed at regular intervals, so you normally never need to deliver the queue manually with the processq utility. You can also manage the queue by using the Netscape Console. For more information, see Managing the Message Queue in Chapter 3.

processq Examples

To deliver all messages in the deferred queue:

/usr/lib/processq

To deliver all queued mail addressed to math.marsu.edu:

/usr/lib/processq -Rmath.marsu.edu

To deliver all queued mail addressed to all hosts in the domain marsu.edu:

/usr/lib/processq `*.marsu.edu'

qconvert

The qconvert utility converts the Netscape Messaging Server 3.x message queue to the Netscape Messaging Server 4.0 format.

Examples of Ways to Use qconvert

qconvert [-s sourceq -d targetq] [-l] [-r] [-h] [-f configdbfile]

Requirements: Must be run locally on the Messaging server.
Location: server-root/bin/msg/admin/bin

Table A.17 qconvert options

Option
Description
-d targetq
Specifies the pathname of the new message queue.
-h
Displays help for this command.
-l
Writes the results to the screen. If you do not specify this option, qconvert writes results to the default log file in the log/default directory.
-r
Removes messages after conversion.
-s sourceq
Specifies the pathname of the old message queue.
-f configdbfile
Specifies the pathname of the configuration database.

If you do not specify the location of the 3.x message queue or the 4.0 message queue, the qconvert utility reads the 3.x and 4.0 configuration files to locate the message queue directories. Consequently, if you do not specify the message queue locations, the following configuration information must be available to the qconvert utility.

For Messaging Server 3.x, configuration information is determined as shown in Table A.18:

Table A.18 Messaging Server 3.x configuration information

Unix
Windows NT
MASTERCONFIG
environment variable

Registry key in HKEY_LOCAL_MACHINE:
SOFTWARE\\Netscape\MessagingServer\\3.0
/etc/netscape.mail.conf

For Messaging Server 4.0, configuration information is determined as shown in Table A.19 :

Table A.19 Messaging Server 4.0 configuration information

Unix
Windows NT
CONFIGROOT
environment variable

Registry key in HKEY_LOCAL_MACHINE:
SOFTWARE\\Netscape\MessagingServer\\4.0
/etc/nsserver.cfg

The qconvert utility reads the 3.x directories in the following order:
sourceq/control, sourceq/deferred, sourceq/messages. These directories are subdirectories of the post office directory that was specified at installation time.

The qconvert utility reads and converts the 3.x directories as follows:

  1. The utility reads the 3.x control files and rewrites them into the 4.0 envelope log file located in targetq/control/env-date-1.
  2. The utility reads the 3.x deferred directory and creates an envelope file for every subdirectory in the 4.0 deferred directory.
  3. The utility merges the 3.x message header file (-Header) and message body file (-Body) into one 4.0 file located in targetq/control/msgname.
The utility automatically converts 3.x access rights to 4.0 access rights so that users have access to the appropriate files.

quota

The quota utility reports mailbox quota usage. This utility generates a report listing quotas, giving their limits and usage.

quota Syntax

quota [user/user-id...]

Requirements: Must be run locally on the Messaging server.
Location: server-root/bin/msg/admin/bin

Table A.20 quota options

Option
Description
user/user-id
The quota listing is limited to quota roots with names that start with one of the given user IDs.

Netscape Messaging Server 4.0 supports quotas at the root (inbox) level. Quotas on subdirectories are not supported.

readership

The readership utility reports on how many users other than the mailbox owner have read messages in a shared mailbox. This utility scans all mailboxes.

A mailbox owner may grant permission for others to read mail in the owner's box. Administrators can use the readership utility to see how many users are accessing a mailbox other than the owner.

readership Syntax

readership [-d days] [-p months]

Requirements: Must be run locally on the Messaging server.
Location: server-root/bin/msg/admin/bin

Table A.21 readership options

Option
Description
-d days
Counts as a reader any identity that has selected the mailbox within the indicated number of days. The default is 30.
-p months
Does not count users who have not selected the mailbox within the indicated number of months. The default is infinity and removes (prunes) the seen flag data for those users. This option also removes the "seen" flag data for those users from the store.

This utility produces one line of output per mailbox, 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 mailbox 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 mailboxes owner.

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 mail store.

Note that low-level database repair, such as completing transactions and rolling back incomplete transactions is performed with stored -d.

reconstruct Syntax

reconstruct [-p partition] [-r [mailbox [mailbox...]] | [-m] [-q]

Requirements: Must be run locally on the Messaging server.
Location: server-root/bin/msg/admin/bin

Note: Netscape recommends that you shut down your server before running the reconstruct utility.

Table A.22 reconstruct options

Option
Description
-m
Performs a high-level consistency check and repair of the mailboxes database. This option assumes that stored is running. 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.
-p partition
Specifies a partition name. You can use this option on the first usage of 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.
-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.

Examples of Ways to Use reconstruct

To rebuild all mailboxes in the primary partition:

reconstruct -r -p primary

To rebuild mailboxes listed in the command line argument only if they are in the primary partition:

reconstruct -p primary mbox1 mbox2 mbox3

To perform a high-level consistency check and repair of the mailboxes database:

reconstruct -m 

You should use the -m option when:

If the stored -d option is unable to make the database consistent, you should:

  1. Shut down all servers.
  2. Remove all files in server-root/msg-instance/store/mboxlist.
  3. Run stored.
  4. In Unix environments, start stored by entering:
    /etc/NscpMsg
    start store

  5. Run reconstruct -m to build a new mailboxes database from the contents of the spool area.
  6. After reconstruct -m completes, restart the server processes.
To rebuild the spool area for the mailboxes belonging to the user crowe:

reconstruct -r user/crowe

To rebuild the spool area for all mailboxes listed in the mailbox database:

reconstruct -r

You should use the -r option when:

stored

The stored utility performs the following functions:

The stored automatically performs cleanup and expiration operations once a day at midnight. You can choose to run additional cleanup and expiration operations.

How Messages are Deleted

Messaging Server messages are erased in three stages:

  1. Delete. An IMAP or POP client marks the message to be deleted. IMAP clients mark messages with a /deleted flag, POP clients use the DELE command. This is referred to as deleting a message. At this point, the client can restore the message by removing the "deleted" marking.
  2. Expunge. A client, or the expiration policies you have specified, expunges messages that have been marked deleted from the mailbox. (IMAP clients do this with the EXPUNGE command. POP clients expunge a mailbox with the QUIT command.) Once messages are expunged, the client can no longer restore them, but they are still stored on disk. (A second POP or IMAP client with an existing connection to the same mailbox may still be able to fetch the messages.)
  3. Cleanup. The stored utility erases messages from the disk that have been expunged for at least one hour.
stored Syntax

To run stored from the command line to perform a specific operation:

stored [-1] [-c] [-n] [-h hour] [-v [-v]]

To run stored as daemon:

stored [-d] [-h hour] [-v [-v]]

Requirements: Must be run locally on the Messaging server.
Location: server-root/bin/msg/admin/bin

Table A.23 stored options

Option
Description
-c
Performs one cleanup pass to erase expunged messages. Runs 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.
-h hour
Run an additional cleanup and expiration operation. The hour value designates the hour of the day that stored is to automatically run. Specify hour in 24 hour format. For example 23 means 11pm. You do not need to use the -1 option when using -h.
-1
Run once, then exit.
-n
Run in trial mode only. Does not actually expire or cleanup messages. Runs once, then exits.
-v
Verbose output.
-v -v
More verbose output.

Examples of Ways to Use stored

To test expiration policies:

stored -c

To perform a single cleanup pass:

stored -n -v

If you want to change the time of the automatic cleanup and expiration operations, use the configutil utility as follows:

configutil -o store.expirestart -v 21

upgrade

The upgrade utility transfers mailboxes stored in 3.x format on a 3.x server to Netscape Messaging Server 4.0 format mailboxes.

The upgrade utility is similar to the migrate utility provided by 3.x. The 3.x utility migrated both users and their mailboxes. The Messaging Server upgrade utility only transfers mailboxes since the way users are stored has not changed from 3.x to 4.0.

The 4.0 upgrade utility assumes that both Messaging Server 3.x and Messaging Server 4.0 reside on the same machine. The utility transfers the 3.x mailboxes on a machine to 4.0 format mailboxes on the same machine. Once upgrade has been run, you cannot start up the 3.x processes.

The 4.0 upgrade process occurs in two steps: (1) The folders are upgraded. (2) The messages are upgraded. You must update the folders (by using the -s option) before you update the messages (by using the -m or -u options). The message upgrade is a multi-threaded process. You can specify the number of threads by using the -t option.

The 4.0 upgrade utility first searches the LDAP server to find all the user mailboxes in that machine (users are considered to belong the 3.x server if their mailhost attribute is one of the MessageHostNames in that 3.x server). It then creates a one-to-one mailbox-mapping information in the 4.0 mailbox database. These mailboxes are marked as "TRANSITION".

Based on the options you specify, upgrade can transfer all 3.x mailboxes immediately. In NT environments, the upgrade utility retrieves the 3.x information through the registry. In Unix environments, the upgrade utility retrieves the 3.x information through a predefined configuration file. The upgrade does not change the 3.x directory structure, so 4.0 must be put in a different directory.

If you have 3.x mailboxes located in non-default mailbox paths, the upgrade utility tries to create a 4.0 mailbox directory in that mailbox path, and uses a number (such as 001) to automatically assign the 4.0 partition name. In 4.0, the partition name is a logical name of a physical directory where user mailboxes can be physically created.

You can find the detailed mailboxes mapping information in the upgrade.conf file in the default 3.x mailbox directory.

If you want to save disk space, you can use the -r option to remove the messages after the upgrade.

If you have servers on multiple machines, you must run upgrade on each different machine.

Note: The 3.x mailboxes might require more disk space after the upgrade to 4.x. For more information on the upgrade process, see the server installation instructions.

upgrade Syntax

upgrade [-s] [-m] [-u userlist] [-i] [-r] [-h] [-f configdbfile] 
[-l
ldapURL] [-t number]

Requirements: Must be run locally on the Messaging server.
Location: server-root/bin/msg/admin/bin

Table A.24 upgrade options

Option
Description
-f configdbfile
Identifies the file name of the configdbfile instance.
-h
Displays help for this command.
-i
Transfer the inbox first. Can be used only with the -m option.
-l ldapURL
Identifies the LDAP URL for the 3.x directory server in which user and group information is stored.
-m
Transfers the mailboxes immediately. You must create mailbox mapping with the -s option before using -m for the first time. For example, -s -m. This can be used in a script.
-r
Remove messages after transfer.
-s
Creates the one-to-one mailbox mapping, but delays transfer. This can be used in a script. You must run the -s option before you run the -m option or the -u option.
-t number
Specifies how many threads to start up for upgrading mailboxes. The default number is 25 threads.
-u userlist
Transfers all mail folders belonging to the user or users in specified in userlist.


Alarm Attributes
Alarm attributes specify how often system checks and other monitoring functions are performed. When a problem is detected an alarm message is sent to the specified person. (System checks are performed by the stored utility.)

You can modify the following alarm attributes by using the configutil command.

Table A.25 Email Alarm Attributes

Email Attributes
Default Value
alarm.msgalarmnoticehost
localhost
alarm.msgalarmnoticeport
25
alarm.msgalarmnoticercpt
Postmaster@localhost
alarm.msgalarmnoticesender
Postmaster@localhost

Table A.26 Disk space alarm attributes

Disk Space Attributes
Default Value
alarm.diskavail.msgalarmstatinterval
3600 seconds
alarm.diskavail.msgalarmthreshold
10%
alarm.diskavail.msgalarmwarninginterval
24 hours

Table A.27 Server response alarm attributes

Server Response Attributes
Default Value
alarm.serverresponse.msgalarmstatinterval
600 seconds
alarm.serverresponse.msgalarmthreshold
10 seconds
alarm.serverresponse.msgalarmwarninginterval
24 hours

Alarm Attribute Examples

To modify the msgalarmnoticercpt attribute to send warning email to joe@airius.com:

configutil -o alarm.msgalarmnoticercpt -v joe@airius.com

To modify the msgalarmstatinterval attribute to monitor disk space every 600 seconds:

configutil -o alarm.diskavail.msgalarmstatinterval -v 600

To modify the msgalarmthreshold attribute to send a warning when the server response time is greater than 15 seconds:

configutil -o alarm.serverresponse.msgalarmthreshold -v 15

 

© Copyright 1998 Netscape Communications Corporation