Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Apple > Operating Systems

  • Print
  • + Share This
Like this article? We recommend

Working With the Mail Store Database

Mac OS X Server stores incoming and outgoing email in separate locations. All outgoing mail is stored in a queue folder located at /var/spool/postfix. Once sent, however, messages are removed from this queue. Typically, outgoing mail will remain in the queue for a limited amount of time (as long it takes for the server to locate the destination server and transfer the mail). Incoming mail is stored as individual files in folders for each user account. A database keeps track of the location and status of each message until it is deleted by an email client. By default, the database itself is stored in the /var/imap directory, and the mail folders and files (referred to collectively as a mail store) are located at /var/spool/imap.

You can easily change the location of the mail store and database, and you can create additional mail stores. Being able to move the mail database enables you to place it on a RAID array or mirror to provide increased performance and/or redundancy in the event of a hardware failure. The same can be said of the mail store. Also, by creating additional mail stores, you can distribute the load of storing mail files across multiple volumes and even multiple servers.

To change the location of either the mail database or store, select the Database tab from the Advanced Mail Settings pane, as shown in Figure 4. To enter a new location for the database or mail store, either enter the file path in the appropriate fields or use the Browse button next to each field. To create additional mail stores, click the Add button below the Additional Mail Stores listbox. Enter a name for the new mail store (also called a partition name) and the file path to its location (or use the Browse button). You can delete or modify additional mail stores by selecting them and clicking the Remove or Edit buttons.

Figure 4

Figure 4 Database tab of the mail service advanced settings pane

When you configure additional mail stores, you need to specify in a user’s account which mail store will be used for their email. You do this by selecting from the configured mail stores in the Mail tab for their account in WorkGroup Manager.

At times, the mail database might become corrupted, resulting in users not being able to access their email or in messages disappearing. If this happens on a large scale, you can repair the database for a given mail store or attempt to reconstruct the mail database for a single user. Both these tasks are completed by using the Maintenance pane of the Mail Service.

To reconstruct the mail database entries for a single user, select the Accounts tab of the Maintenance pane (see Figure 5).

Figure 5

Figure 5 Accounts tab of the mail service maintenance pane

Select the appropriate user and then click the Reconstruct button. To attempt the repair globally or for specific mail stores, select the Database tab. If you have only a single mail store, click the Repair button with no selections. If you have multiple mail stores, select the appropriate ones in the Additional Mail Store Location(s) listbox and then click the Repair button (see Figure 6).

Figure 6

Figure 6 Database tab of the mail service maintenance Pane

  • + Share This
  • 🔖 Save To Your Account