Help Top

Message content storage

The content of any given message may be small or large. With multiple attachments, the total content size for a single message can exceed 10 megabytes. Storing all message content for an account that may contain more 100,000 messsages in the database may be unwise. For this reason, DArcMail allows you to divide the storage for message content between the database and external storage. Here are the rules:

Subdirectories for externally stored message content

If a message part is stored externally, it is stored in a file located in the same directory as the mbox file for the the email folder that contained the message. File names for externally stored message parts are constructed from UUIDs (universally unique identifiers). They look like this:

60c675f1-a16e-4295-a20f-ae3d31405754.raw

d50e05ed-ed31-4e25-84d0-62bb660cf727.raw

Depending on the number of messages, the number of parts, and the upper size limit you specify, there may be thousands of these external files. To prevent the size of the directory from becoming too large, you can tell the account loader program to distribute the externally stored content in subdirectories of the email folder directory. If you do request storage in subdirectories, then the loader program will create 1296 subdirectories ('aa','ab',...,'az','a0',a1',...,'a9','ba','bb',...,'z9',...,'99') within the folder directory and will distribute the content files among these subdirectories. The subdirectory in which a file is stored is determined by the the 10th and 11th characters in the file name; since these characters are randomly distributed in a set of UUIDs, each subdirectory will contain roughly the same number of files. Subdirectories are created only as needed: if an email account has only one externally stored message part, then only one subdirectory will be created. When you delete a folder or account, if you specify that externally stored content also be deleted, then an empty subdirectory will also be deleted.

Storage optimization

It is possible for a single piece of content to occur in more than one message. For example, a signature block may be in its own message part, occurring in thousands of messsges. Likewise, a large attachment may be an attachment to several messages. DArcMail optimizes storage in the following way:

Help Top