Sun Java System Messaging Server 6 2005Q4 Administration Guide

Message Store Directory Layout

Figure 18–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 18–2.

Figure 18–1 Message Store Directory Layout

Graphic shows Message Store directory layout.

The message store consists of a number of mailbox databases and the user mailboxes. The mailbox databases consists of information about users, mailboxes, partitions, quotas and other message store related data. The user mailboxes contain the user’s messages and folders. Mailboxes are stored in a message store partition, an area on a disk partition specifically devoted to storing the message store. See Configuring Message Store Partitions for details. Message store partitions are not the same as disk partitions, though for ease of maintenance, we recommend having one disk partition for each message store partition.

Mailboxes such as INBOX are located in the store_root. For example, a sample directory path might be:

store_root/partition/primary/=user/53/53/=mack1

The table below describe the message store directory.

Table 18–2 Message Store Directory Description

Location  

Content/Description  

msg_svr_base

Default: /opt/SUNWmsgsr

The directory on the Messaging Server machine that holds the server program, configuration, maintenance, and information files. 

store_root

msg_svr_base/data/store

Top-level directory of the message store. Contains the mboxlist, user, and partition subdirectories.

./store.expirerule

Contains the automatic message removal rules (expire rules). This optional file can be at different locations. See To Set the Automatic Message Removal (Expire and Purge) Feature

store_root/dbdata/snapshots

Message store database backup snapshots. 

store_root/mboxlist/

Contains mailbox database, database (Berkeley DB) that stores information about the mailboxes and quota information. 

folder.db 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 folder.db per mailbox

quota.db contains information about quotas and quota usage. There is one entry in quota.db per user.

lright.db - an index for the folders by acl lookup rights.

peruser.db contains information about per-user flags. The flags indicate whether a particular user has seen or deleted a message.

subscr.db contains information about user subscriptions.

store_root/session/

Contains active message store process information. 

store_root/user/

Not used. 

store_root/partition/

Contains the message store partitions. A default primary partition is created. Place any other partitions you define in this directory.

store_root/partition/primary/=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/userid/

The top-level mail folder for the user whose ID is userid. This is the user’s INBOX. For the default domain, userid is uid. For hosted domains, userid is uid@domain. Incoming messages are delivered to this mail folder.

.../userid/folder

A user-defined mailbox on the messaging server. 

.../userid/store.idx

An index that provides the following information about mail stored in the /userid/ directory: number of messages, disk quota used by this mailbox, the time the mailbox was last appended, message flags, variable-length information for each message including the headers and the MIME structure, 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.

.../userid/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. 

.../userid/store.sub

Contains information about user subscriptions. 

.../userid/store.exp

Contains a list of message files that have been expunged, but not removed from disk. This file appears only if there are expunged messages. 


.../userid/nn/
or
.../userid/folder/nn/

nn is a hash directory that contains messages in the format message_id.msg; nn can be a number from 00 to 99. message_id is also a number. Example: messages 1 through 99 are stored in the .../00 directory. The first message is 1.msg, the second is 2.msg, third 3.msg, and so on. 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.