Complete Contents
About This Guide
Chapter 1 Getting Started with Netscape Messaging Server
Chapter 2 Configuring POP, IMAP, and HTTP 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
Chapter 12 Program Delivery
Chapter 13 Messaging Multiplexor
Appendix A Command Line Utilities
Appendix B sendmail Migration and Compatibility
Appendix C SNMP MIB
Glossary
Index
Messaging Server Administrator's Guide: Managing the Message Store
Previous Next Contents Index


Chapter 5 Managing the Message Store

This chapter describes the message store and the message store administration interface. This chapter contains the following sections:


Overview
The message store contains the user mailboxes for a particular Messaging Server instance. The size of the message store increases as the number of mailboxes, folders, and log files increase. You can control the size of the store by specifying limits on the size of mailboxes (disk quotas) and by setting aging policies for messages in the store.

As you add more users to your system, your disk storage requirements increase. Depending on the number of users your server supports, the message store might require one physical disk or multiple physical disks. If you have a very large user base, you might have multiple Messaging Server instances, each responsible for a particular message store.

To manage the message store, Netscape Messaging Server provides a set of command-line utilities in addition to the Netscape Console interface. Table 5.1 describes these command-line utilities. For information about using these utilities, see Performing Maintenance and Recovery Procedures and Appendix A, Command-line Utilities.

Table 5.1 Message store command-line utilities

Utility
Description
hashdir
Identifies the directory that contains the message store for a particular user.
mboxutil
Lists, creates, deletes, renames, or moves mailboxes.
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.

Netscape Messaging Server also provides utilities to help you upgrade from a 3.x server to a 4.x server. For details about the upgrade process, see the Messaging Server Installation Guide.


Message Store Directory Layout
Figure 5.1 shows the message store directory layout for a server instance. The message store is designed to provide fast access to mailbox contents. The store directories are described in Table 5.2.

Figure 5.1 Message store directories

For example, a sample directory path might be:

server-root/msg-instance/store/partition/primary/=user/53/53/=mack1

Table 5.2 Message store directories

Location
Content/Description
server-root/msg-instance/store/
Top-level directory of the message store. Contains the mboxlist, user, and partition subdirectories.
.../store/mboxlist/
Contains a database (Berkley DB) that stores information about the mailboxes on the server and stores quota information about the mailboxes.

The file data.db2 contains information about mailboxes, including the name of the partition where the mailbox is stored, the ACL, and a copy of some of the information in store.idx. There is one entry in data.db2 per mailbox

The file quota.db2 contains information about quotas and quota usage. There is one entry in quota.db2 per user.

.../store/user/
Contains information about the IMAP folders to which each user subscribes. Information for each user is stored in a file called user-id.sub. These files are stored in a hash structure for fast searching. To find the directory that contains a particular user's files, use the hashdir utility.
.../store/partition/
Contains the default primary partition. You can also place any other subpartitions you define in this partition.
/subpartition/=user/
Contains all the user mailboxes in the subdirectory of the partition. The mailboxes are stored in a hash structure for fast searching. To find the directory that contains a particular user's mailbox, use the hashdir utility.
/=user/hashdir/hashdir/
user-id/

The top-level mail folder for the user whose ID is user-id. Messages are delivered to this mail folder.
/user-id/folder-name
A user-defined folder.
/user-id/store.idx
An index that provides the following information about mail stored in the /user-id/ directory: number of messages, disk quota used by this mailbox, the time the mailbox was last appended, pointers within the store.cch file for each message, message flags, and the size of each message. The index also includes a backup copy of mboxlist information for each user and a backup copy of quota information for each user.
/user-id/store.cch
A cache file for frequently requested message information. The file contains variable-length information for each message including the headers and the MIME structure.
Note: The authenticated sender information in this file can be lost by running the reconstruct utility.
/user-id/store.exp
Contains a list of message files that have been expunged, but not removed from disk.
/user-id/store.usr
Contains a list of users who have accessed the folder. For each user listed, contains information about the last time the user accessed the folder, the list of messages the user has seen, and the list of messages the user has deleted.
/user-id/nn/
A hash directory that contains messages in the format msg-id.msg; nn can be a number from 00 to 99.

For example, messages 1 through 99 are stored in the 00 directory; messages 100 through 199 are stored in the 01 directory; messages 9990 through 9999 are stored in the 99 directory; messages 10000 through 10099 are in the 00 directory, and so on.


How Messages Are Erased from the Store
Messages are erased from the store in three stages:

  1. Delete. A client marks the message to be deleted. At this point, the client can restore the message by removing the "deleted" marking.
  2. Expunge. A client, or the aging policies you have specified, expunges messages that have been marked deleted from the mailbox. Once messages are expunged, the client can no longer restore them, but they are still stored on disk. (A second client with an existing connection to the same mailbox may still be able to fetch the messages.)
  3. Cleanup. The stored utility erases from the disk any messages that have been expunged for at least one hour.

Specifying Administrator Access to the Store
Message store administrators can view and monitor user mailboxes and specify access control for the message store. Store administrators have proxy authentication privileges to any service (POP, IMAP, HTTP, or SMTP), which means they can authenticate to any service using the privileges of any user. These privileges allow store administrators to run certain utilities for managing the store. For example, using MoveUser, store administrators can move user accounts and mailboxes from one system to another (for more information, see MoveUser).

To specify administrator access to the store:

  1. From Netscape Console, open the Messaging Server you want to configure.
  2. Click the Configuration tab and select Message Store in the left pane.
  3. Click the Administrator tab in the right pane.
From this tab, you can perform the following tasks:

Adding an Administrator

To add an administrator entry:

  1. Click the Administrator tab.
  2. The tab contains a list of existing administrator IDs.

  3. Click the Add button beside the Administrator UID window.
  4. In the Administrator UID field, type the user ID of the administrator you want to add.
  5. The user ID you type must be known to the Netscape Directory Server.

  6. Click OK to add the administrator ID to the list displayed in the Administrator tab.
  7. Click Save in the Administrator tab to save the newly modified Administrator list.
Command Line

You can also add store administrators at the command line as follows:

configutil -o store.admins -v "adminlist"

where adminlist is a comma-separated list of administrator IDs. If you specify more than one administrator, you must enclose the list in quotes.

Modifying an Administrator Entry

To modify an existing entry in the message store Administrator UID list:

  1. Click the Administrator tab.
  2. Click the Edit button beside the Administrator UID window.
  3. Enter your changes to the Administrator UID field.
  4. Click OK to submit your changes and dismiss the Edit Administrator window.
  5. Click Save in the Administrator tab to submit and preserve the modified Administrator list.
Command Line

You can also modify the store administrator list at the command line as follows:

configutil -o store.admins -v "adminlist"

Deleting an Administrator Entry

To delete an entry from the message store Administrator UID list:

  1. Click the Administrator tab.
  2. Select an item in the Administrator UID list.
  3. Click Delete to delete the item.
  4. Click Save to submit and preserve your changes to the Administrator list.
Command Line

You can also delete store administrators at the command line by editing the store administrator list as follows:

configutil -o store.admins -v "adminlist"


Configuring User Disk Quotas
You can specify disk quotas to control disk space usage. Disk quotas allow you to limit the amount of disk space allotted to each user. Quotas apply to the total size of all the user's messages, regardless of how many mail folders the user has. If disk space is limited, you might want to set user disk quotas.

If the total size of all the user's messages exceeds the specified limit, messages destined for the user remain in the message queue until one of the following occurs: (1) The size of all the user's messages no longer exceeds the limit, at which time the server delivers the message to the user. (2) The message has been in the queue longer than the specified grace period and the user is still over quota, at which time the server bounces the message.

Note: The server does not consider the size of the message when it is attempting to deliver to an account that is still under quota. If the message causes the user to go over quota, the message is still delivered, but the next message will be held in the queue.

Disk space becomes available when a user deletes and expunges messages or when the server deletes messages according to the maintenance policies you have established.

You can set disk quotas for individual users by using the Users and Groups interface. You can set default disk quotas for all users by choosing the Message Store Quota tab.

  1. From Netscape Console, open the Messaging Server you want to configure.
  2. Click the Configuration tab and select Message Store in the left pane.
  3. Click the Quota tab in the right pane.
From this form, you can perform the following tasks:

Specifying a Default User Disk Quota

The default disk quota applies to users who do not already have individual disk quotas set for them. A quota set for an individual user overrides the default quota.

  1. Click the Quota tab.
  2. Select one of the following options:
  3. Click Save.
Command Line

You can also specify a default user disk quota at the command line as follows:

configutil -o store.defaultmailboxquota -v [ -1 | number ]

where -1 indicates no quota; number indicates a number in bytes.

Specifying a Quota Threshold

You can send a warning message to IMAP users before they reach their disk quota by specifying a quota threshold. When a user's disk usage exceeds the specified threshold, the server sends a warning message to the user.

For IMAP users whose clients support the IMAP ALERT mechanism, the message is displayed on the user's screen each time the user selects a mailbox (a message is also written to the IMAP log).

To specify a quota threshold:

  1. Click the Quota tab.
  2. In the "Quota warning threshold" field, enter a number for the warning threshold.
  3. This number represents a percentage of the allowed quota. For example, if you specify 90%, the user is warned after using 90% of the allowed disk quota. The default is 90%. To turn off this feature, enter 100%.

  4. Click Save.
Command Line

You can also specify a quota threshold at the command line as follows:

configutil -o store.quotawarn -v number

where number indicates a percentage.

Defining a Quota Warning Message

You can define the message that will be sent to users who have exceeded their disk quota as follows. Messages are sent to the user's mailbox.

  1. Click the Quota tab.
  2. From the drop-down list, choose the language you want to use.
  3. Type the message you want to send in the message text field below the Threshold field.
  4. Click Save.
Command Line

You can also define a quota warning message at the command line as follows:

configutil -o store.quotaexceededmsg -v message

The message must be in RFC 822 format.

Setting a Grace Period

If a user mailbox exceeds the disk quota, the grace period you specify determines how long messages will be held in the message queue before the server starts bouncing the messages. Messages will remain in the queue until one of the following occurs:

To set a grace period for how long messages are held in the queue:

  1. Click the Quota tab.
  2. In the "Over quota grace period" field, enter a number.
  3. From the drop-down list, specify Day(s) or Hour(s).
  4. Click Save.
Command Line

You can also specify a quota grace period at the command line as follows:

configutil -o store.quotagraceperiod -v number

where number indicates number of hours.


Configuring Message Store Partitions
All user mailboxes are stored by default in the /store/partition/directory. The partition directory is a logical directory that might contain a single subpartition or multiple subpartitions. The subpartitions might map to a single physical drive or to multiple physical drives. At start-up time, the partition directory contains one subpartition called the primary partition.

You can add partitions to the partition directory as necessary. For example, you might want to partition a single disk to organize your users as follows:

As disk storage requirements increase, you might want to map these partitions to different physical disk drives.

You should limit the number of mailboxes on any one disk. Distributing mailboxes across disks improves message delivery time (although it does not necessarily change the SMTP accept rate). The number of mailboxes you allocate per disk depends on the disk capacity and the amount of disk space allocated to each user. For example, you can allocate more mailboxes per disk if you allocate less disk space per user.

If your message store requires multiple disks, you can use RAID (Redundant Array of Inexpensive Disks) technology to ease management of multiple disks. With RAID technology, you can spread data across a series of disks but the disks appear as one logical volume so disk management is simplified. You might also want to use RAID technology for redundancy purposes; that is, to duplicate the store for failure recovery purposes.

To add a partition to the store, do the following:

  1. From Netscape Console, open the Messaging Server you want to configure.
  2. Click the Configuration tab and select Message Store in the left pane.
  3. Click the Partition tab in the right pane.
  4. Click the Add button.
  5. Enter the Partition nickname.
  6. The name you enter must be an alphanumeric name and must use lowercase letters.

    The partition nickname allows you to map users to a logical partition name regardless of the physical path. When setting up user accounts and specifying the message store for a user, you can use the partition nickname.

  7. Enter the Partition path.
  8. This is the absolute path name for the specified partition. The partition will be created at this location. The user ID used to run the server must have permission to write to this location, in order to create and manage the partition.

  9. To specify this as the default partition, click the selection box labeled Make This the Default Partition.
  10. Click OK to submit this partition configuration entry and dismiss the window.
  11. Click Save to submit and preserve the current Partition list.
Note: After adding a partition, you must stop then restart the server to refresh the configuration information.

Note: To improve disk access, the message store and the message queue should reside on separate disks.

Command Line

You can also add a partition to the store at the command line as follows:

configutil -o store.partition.nickname.path -v path

where nickname is the logical name of the partition and path indicates the absolute path name where the partition is stored.


Specifying Aging Policies
Aging policies are another way to control disk usage on your server. You can control how long messages are stored in one or more mailboxes. If you have limited disk space, you might want to set aging policies to remove messages from the store. If you set aging policies, you should educate your users about these policies because the server will not send warning messages before it deletes messages from the store.

You can create aging rules based on the following criteria:

If you specify more than one rule for a mailbox, all expiration rules will apply, but the most restrictive rule takes precedence. For example, assume two rules apply to a single mailbox. The first rule allows 1000 messages; the second rule allows 500 messages. When expiration occurs, the server will delete messages from the mailbox until 500 remain. For another example, if the first rule allows a message size of 100,000 bytes for 3 days and the second rule allows a message size of 1000 bytes for 12 days, the resulting union of rules allows a message size of 1000 bytes for 3 days. The server will delete messages over 1000 bytes that have been in the mailbox over 3 days. If you want to ensure that a specific rule is the only rule for a particular mailbox or set of mailboxes, use the Exclusive parameter.

To create a new rule:

  1. From Netscape Console, open the Messaging Server you want to configure.
  2. Click the Configuration tab and select Message Store in the left pane.
  3. Click the Aging tab in the right pane.
  4. Click Add to go to the Add Rule window.
  5. Enter a name for the new rule.
  6. Specify the target folders for which this rule applies.
  7. You can enter a path name, filename, or partial string. You can use IMAP wildcards as follows:

    * - Match any character.
    % - Match any character except a slash character.

    The new rule applies only to folders matching the pattern you specify.

  8. If this rule is to be the only rule applied to the target folders, click the Exclusive selection box.
  9. If you want to create a rule based on folder size, do the following:
  10. When the specified folder size is exceeded, the server removes the oldest messages until this size is no longer exceeded.

  11. If you want to create a rule based on message age, in the "Number of days" field, specify a number to indicate how long messages should remain in the folder.
  12. If you want to create a rule based on message size:
  13. After the grace period, the server deletes messages that exceed the maximum size.

  14. Click OK to add the new rule to the Aging Rule list and dismiss the Add window.
  15. Click Save to submit and preserve the current Aging Rule list.
Command Line

You can also specify aging rules at the command line as follows. In the examples, name represents the name you give the rule.

To specify the target folders for which this rule applies:

configutil -o store.expirerule.name.folderpattern -v pattern

To specify that this rule is to be the only rule applied to the target folders:

configutil -o store.expirerule.name.exclusive -v [ yes | no ]

To specify the maximum number of messages that will be retained in a folder before the oldest messages are removed:

configutil -o store.expirerule.name.messagecount -v number

To specify the folder size:

configutil -o store.expirerule.name.foldersizebytes -v number

where number is a size in bytes.

To specify message age:

configutil -o store.expirerule.name.messagedays -v number

where number indicates the number of days.

To specify message size:

configutil -o store.expirerule.name.messagesize -v number

where number is a size in bytes.

To indicate how long over-sized messages should remain in the folder:

configutil -o store.expirerule.name.messagesizedays -v number

where number indicates number of days.


Performing Maintenance and Recovery Procedures
This section provides information about the utilities you use to perform maintenance and recovery tasks for the message store. You should always read your postmaster mail for warnings and alerts that the server might send. You should also monitor the log files for information about how the server is performing.

You can configure the server error handler so that error messages about disk quota are sent to the postmaster account and to the log file. For more information about configuring the error handler, see Specifying Error Handling. For more information about log files, see Chapter 11, Logging and Log Analysis.

Using the stored Utility

The stored utility performs the following monitoring and maintenance tasks for the server:

This utility automatically performs cleanup and expiration operations once a day.

For more information about using the stored utility, see Appendix A, Command-line Utilities.

Managing Mailboxes

The mailboxes in the message store are stored in a hash structure for fast searching. Consequently, to find the directory that contains a particular user's mailbox, use the hashdir utility as follows:

hashdir userid

You use the mboxutil command to perform typical maintenance tasks on mailboxes. These tasks include the following:

For more information about using the mboxutil utility, see Appendix A, Command-line Utilities.

Repairing Mailboxes and the Mailboxes Database

If one or more mailboxes becomes corrupt, you can use the reconstruct utility to rebuild the mailboxes or the mailboxes database, and repair any inconsistencies. For more information about using the reconstruct command, see Appendix A, Command-line Utilities.

Monitoring Disk Space

You can monitor disk space by configuring the following alarm attributes. You configure these attributes by using the configutil utility. You can specify how often the system should monitor disk space and under what circumstances the system should send a warning.

alarm.diskavailmsgalarmstatinterval

alarm.diskavail.msgalarmthreshold
alarm.diskavail.msgalarmwarninginterval
For example, if you want the system to monitor disk space every 600 seconds, specify the following command:

configutil -o alarm.diskavail.msgalarmstatinterval -v 600

If you want to receive a warning whenever available disk space falls below 20%, specify the following command:

configutil -o alarm.diskavail.msgalarmthreshold -v 20

For more information about setting alarm attributes, see Appendix A, Command-line Utilities.

Monitoring Disk Quota Usage

You can monitor disk quota usage by using the quota utility. The quota utility generates a report that lists defined quotas and limits, and provides information on quota usage. For more information on the quota utility, see Appendix A, Command-line Utilities.

Backing Up and Restoring the Message Store

For information about backing up the message store and restoring the message store, contact your Netscape technical support person.


Interface Reference: Message Store Configuration
This section describes the Messaging Server interface elements that allow you to configure the server's message store services. You access these elements through Netscape Console; see Managing Servers With Netscape Console for information on using Netscape Console to manage the Messaging Server and other Netscape servers.


Administrator Tab
The Administrator tab allows you to view the list of message store administrators and to add entries to this list. For more information, see also Specifying Administrator Access to the Store.

The Administrator Tab has the following elements:

Administrator UID list. This field displays the list of administrators for this message store.

Add. Click this button to go to the Store Administrator Entry window. This window enables you to add administrators to the list.

Edit. Click this button to go to the Store Administrator Entry window. This window enables you to edit the selected entry in the Administrator UID list.

Save. Click this button to save the current administrator list.

Reset. Click this button to return the list contents to the previously-saved version.


Store Administrator Entry Window
The Store Administrator Entry window allows you to add or edit an entry in the message store administrator list.

The Store Administrator Entry window has the following elements:

Administrator UID. In this field, enter the user ID of the Administrator you want to add to the message store administrator list. This must be a valid user ID known to the Directory Server.

OK. Click this button to submit your entry and dismiss the window and return to the Administrator form.

Cancel. Click this button to dismiss the window without submitting your entry information.


Quota Tab
The Quota tab allows you to define default user disk quotas for the message store. For more information, see also:

The Quota tab has the following elements:

Default user disk quota. This is the amount of storage to be allotted to a user if no disk quota is specified for that user. You can specify either:

Quota warning threshold. In this field, type a number to specify the percentage of disk quota usage which, when exceeded by a user, generates a warning message by the server.

Message to send to the user when quota is exceeded. In this field, enter the contents of the warning message to be sent when a user's disk quota is exceeded.

Over quota grace period. In this field, type a number to indicate how long the messaging server will hold messages in the queue for users who have exceeded their disk quota. From the associated drop-down list, choose days or hours.

Save. Click this button to submit and preserve the current disk quota specifications.

Reset. Click this button to return the specifications to the previously-saved version.


Partition Tab
The Partition tab allows you to view message store partition information, and to add, edit, and delete partition entries. For more information, see also Configuring Message Store Partitions.

The Partition tab has the following elements:

List of partitions. This area lists disk partition information for the message store. This includes the following fields:

Add. Click this button to go to the Store Partition Entry window. This window enables you to add a partition. See Store Partition Entry Window.

Edit. Click this button to go to the Store Partition Entry window. This window enables you to edit information about a partition.

Delete. Click this button to delete a partition you've highlighted in the partition list.

Save. Click this button to submit and preserve the current partition list.

Reset. Click this button to return the partition list to the previously-saved version.


Store Partition Entry Window
The Store Partition Entry window allows you to add or edit a partition entry in the partition list on the Partition form. For more information, see also Configuring Message Store Partitions.

The Store Partition Entry window has the following elements:

Partition nickname. This is the name you want to assign to the partition.

Partition path. This is the absolute pathname for the specified partition. The partition will be created at this location. The userID used to run the Server must have permission to write to this location, in order to create and manage the partition.

Make this the default partition. Click this box to configure this partition as the default.

OK. Click this button to submit this partition entry and dismiss the window.

Cancel. Click this button to dismiss the window without submitting the partition information.


Aging Tab
The Aging tab lists the aging policy for retaining and removing messages from target folders. This tab also allows you to define, add, edit, and delete aging rules. For more information, see also Specifying Aging Policies.

The Aging tab has the following elements:

Message store aging rules list. This area lists the aging rules for the message store. The table includes the following fields:

Add. Click this button to go to the Aging Rule Entry window. This window enables you to define an aging rule for the message store.

Edit. Click this button to go to the Aging Rule Entry window. This window enables you to edit a defined aging rule.

Delete. Click this button to delete a rule you've selected in the rules list.

Save. Click this button to submit and preserve the current aging rules list.

Reset. Click this button to return the list contents to the previously-saved version.


Aging Rule Entry Window
The Aging Rule Entry window allows you to define or edit an aging rule entry, and to specify matching patterns for determining rule targets.

The Aging Rule Entry window has the following elements:

Name. Enter the name for the Aging Rule in this field. This is a name you can assign for convenience purposes; it is not used by the Messaging Server.

Apply to folders matching the following pattern. Enter a pathname, filename, or partial string to be used as the criteria for determining rule targets.

Exclusive. Click this selection box to specify that this rule is to be the only rule applied to the target folders.

Message count. In this field, type the maximum number of messages which will be retained in a folder before the oldest messages are removed.

Folder size. In this field, type the maximum size for the target folder. From the associated drop-down list, choose MByte(s) or KByte(s). When the specified folder size is exceeded, the oldest messages are removed until this size is no longer exceeded.

Number of days. In this field, type the number of days allowed for retaining messages in a target folder. After the specified retention period has elapsed for a given message in a target folder, the message is removed.

Message size limit. In this field, type the maximum allowed size for messages stored in a target folder. From the associated drop-down list, choose MBytes or KBytes.

Grace period. In this field, type a number to indicate the number of days oversized messages are allowed to remain in the folder before being deleted.

OK. Click OK to add the new rule to the rules list and dismiss the window.

Cancel. Click cancel to dismiss the window without submitting the new rule.

 

© Copyright 1999 Netscape Communications Corp., a subsidiary of America Online, Inc. All rights reserved.