Using External Archive Stores

In MailStore there are two types of archive stores: Internal Archive Stores and External Archive Stores.

While, with interal archive stores, folder information, meta data, email headers and contents as well as the full text index are stored in the file system, external archive stores allow you to store some of these components in SQL databases.

Database servers where external archive stores reside on must not be turned off or put into standby mode at any time, as long as there is a MailStore Server service accessing them. Otherwise, database corruption may occur, which can lead to data loss. If database servers must be turned off or rebooted, for example due to maintenance, please set the corresponding external archive stores to disabled first.

For most environments, using internal archive stores is recommended; these are described in detail in chapter Storage Locations.

Structure of an Archive Store

In MailStore, both internal and external archive stores always consist of the following three components:

  • Folder Information and Meta Data
    Contains all data needed for the construction of the folder structure and the email list.
  • Email Headers and Contents
    Contains the actual payload of the archive.
  • Full Text Index
    Contains all data needed for searching through emails and attachments. The full text index can be reconstructed at any time.
    MailStore always uses its own high-performance full text index and not the index of the SQL database, therefore the full text index always has to be stored in the file system. Additional information on full text indexes is available in chapter Search Indexes.


Creating an External Archive Store

Under Administrative Tools > Storage > Storage Locations you can create new archive stores and manage the archive's existing archive stores. To create an external archive store, please proceed as follows:

  • Below the list of archive stores, click on the Create... button.
  • Tech storageloc adv 01.png
    The Create New Archive Store wizard opens.
  • Select the database type:
    • External Microsoft SQL Server Database
      The archive store is stored in an external Microsoft SQL Server Database. Emails can be stored in the database or in the file system.
    • External PostgreSQL Database
      The archive store is stored in an external PostgreSQL Database. E-Mails can be stored in the database or in the file system.
  • Click on Next.

Based on the database type additional parameters need to be configured in the next step.

External Archive Store Type: External Microsoft SQL Server Database

Before you can set up the database connection in MailStore, an empty database has to be created on the database server. The MailStore user who is used for the connection should be the owner of the database. Please see the documentation of the database server for details.

Folder information and meta data are always stored in the SQL database, while storing email headers and contents therein is optional.

Please note: MailStore supports all editions of Microsoft SQL Server Version 2008, 2012, 2014 and 2016. Please keep their respective size limits in mind and verify their suitability for managing the expected volume of data in your environment.

Once you have created an empty database, please proceed as follows:

  • Enter a name for the new external archive store in the Name field, e.g. 2016-12.
  • If you don't want MailStore to archive new emails in the new archive store, deselect the option Archive new messages here.
  • Specify the connection parameters for the Microsoft SQL Server Database Connection:
    • Tech storageloc adv mssql 01.png
      Server Name: Enter the server name or the IP address of the SQL server on which a database has been created for MailStore. If you click on the arrow to the right of the input field, MailStore will return a list of all Microsoft SQL servers located on the network.
    • User Name: Name of the user with access to the database.
    • Password: Password of the user listed under User Name. Passwords may not start or end with whitespace characters.
    • Database: Name of the database to be used by MailStore. Click on the arrow to the right of the input field to obtain a list of all available databases on the server.
  • Under email headers and contents select the appropriate storage location.

    Microsoft SQL Server Database is the default suggestion. When choosing Directory (File System), the input field Directory is activated. MailStore derives a directory based on the name entered and the path of the master database. To choose a different directory, click on the button next to the Directory field or enter a path manually.
    The specified directory is created automatically. If it already exists, it must not contain any files or subfolders.
  • A directory for the full text index is also derived based on the name entered and the path of the master database.
  • Click on Finish.

Please note that distributing the individual components of an external archive store among different local drives or network shares significantly increases the complexity of Backup and Restore.

External Archive Store Type: External PostgreSQL Database

Before you can set up the database connection in MailStore, an empty database has to be created on the database server. The MailStore user who is used for the connection should be the owner of the database. Please see the documentation of the database server for details.

Folder information and meta data are always stored in the SQL database, while storing email headers and contents therein is optional.

Please note: MailStore supports PostgreSQL version 10 or newer.

Once an empty database has been created, please proceed as follows:

  • Enter a name for the new external archive store in the Name field, e.g. 2016-12.
  • If you don't want MailStore to archive new emails in the new archive store, deselect the option Archive new messages here.
  • Specify the connection parameters for the PostgresSQL Database Connection:
    • Tech storageloc adv pgsql 01.png
      Server Name: Enter the server name or the IP address of the SQL server on which a database has been created for MailStore.
    • Encrypted Connection: Enable encryption of connection to the database server.
    • Accept all certificates: If the certificate provided by the remote host cannot be verified (e.g. self-signed or signed by an unknown certificate authority), enable the option Accept all certificates to allow MailStore to establish a connection. As this option leads to an insecure configuration, warnings may appear in the summary and/or the dashboard.
    • User Name: Name of a user with access to the database.
    • Password: Password of the user specified under User Name. Passwords may not start or end with whitespace characters.
    • Database: Name of the database to be used by MailStore. To obtain a list of all available databases on the server, click on the arrow to the right of the input field.
  • Under Email Headers and Contents select the appropriate storage location.

    PostgresSQL Database is the default suggestion. Selecting Directory (File System) activates the input field Directory. MailStore derives a directory based on the name entered and the path of the master database. To choose a different directory, click on the button next to the Directory field or enter a path manually.
    The specified directory is created automatically. If it already exists, it must not contain any files or subfolders.
  • A directory for the full text index is also derived based on the name entered and the path of the master database.
  • Click on Finish.

Please note that distributing the individual components of an advanced archive store among different local drives or network shares significantly increases the complexity of Backup and Restore.