Archiving Emails from Microsoft Exchange 2016

This implementation guide covers the specifics of archiving Microsoft Exchange 2016 mailboxes. It is assumed that you already have a MailStore Server installation or test installation and are familiar with the fundamentals of MailStore Server. Please refer to the Manual or the Quick Start Guide for more information.

MailStore Server offers several ways to archive emails from Microsoft Exchange 2016 mailboxes, which are described below. If you are not sure which archiving method best suits your company, please refer to the chapter Choosing the Right Archiving Strategy.

Synchronizing Users

As Microsoft Exchange 2016 requires the existence of an Active Directory, it is recommended to set up a synchronization as described in chapter Active Directory Integration of the MailStore Server manual.

Archiving Individual Mailboxes

In MailStore Server Microsoft Exchange 2016 archiving tasks are stored in archiving profiles. By following the procedure described here you can archive a single Microsoft Exchange 2016 mailbox for a specific MailStore user. The archiving process can be executed manually or automatically. You can find further information about executing archiving profiles in chapter Email Archiving with MailStore Basics.

For each mailbox, please proceed as follows:

Unless the mailbox of the current user is to be archived into his or her own user archive, log on to MailStore Client as MailStore administrator. Only an administrator can archive emails for other users.

Click on Archive Email.

From the Email Servers list in the Create Profile area of the window, select Microsoft Exchange to create a new archiving profile.

A wizard opens to assist in specifying the archiving settings.

Select Single Mailbox.

Under Access via, select the protocol to be used to access the Exchange server. Whenever possible, HTTPS should be used.

Please note: Depending on the protocol chosen there is the option to Ignore SSL Warnings. Generally, these warnings appear if an unofficial or self-signed certificate is used on the Exchange server.

Under Host, enter the name of your Exchange server.

Under User Name, enter the Windows login name of the user whose emails are to be archived (e.g. barbara.ross@example.local or barbara.ross@example.com).

Please note: Alternatively, any user with the appropriate access permissions for the mailbox to be archived can be specified. In this case, it is imperative that this mailbox is specified under Mailbox (see below).

Under Password, enter the user's password.

The field Mailbox must be left blank if a user, whose Windows login name and password is being used, wants to archive his own mailbox. Otherwise, the primary email address of the user whose mailbox you want to archive has to be entered here.

Click on Test to verify that MailStore can access the mailbox.

Click on Next.

If needed, adjust the settings for the List of Folders to be Archived, the filter and the Deletion Rules. By default, no emails will be deleted from the mailbox. The Timeout value only has to be adjusted in specific cases (e.g. with very slow servers).

Important notice: Did you specify IMAP as the protocol and have also defined a deletion rule? If so, folders containing no emails, such as Tasks or Contacts have to be added to the list of excluded folders manually. This is the only way to avoid these folders being archived and deleted according to the deletion rule specified. Please read more in chapter Archiving Specific Folders.

Click on Next to continue.

If logged on to MailStore Server as MailStore administrator, the Target Archive can be specified. Select the archive of the user for whom the selected mailbox is to be archived. If the user does not exist yet, click on Create a New User.

Click on Next.

In the last step, a name for the archiving profile can be specified. After clicking Finish, the archiving profile will be listed under Saved Profiles and, if desired, can be run immediately or automatically.

Archiving Multiple Exchange Mailboxes Centrally

With MailStore, some or all Microsoft Exchange 2016 mailboxes can be archived in a single step. All necessary preparations, such as creating MailStore users, and also the archiving process itself can be executed manually or automatically.

Step 1: Setting up a service account for accessing mailboxes

To archive multiple mailboxes at once, a service account with access access to all mailboxes to be archived needs to be created first. To be able to set up such an account, you must be a member of the Organization Management role group. There are two methods to configure the service account:

Method 1: Setting up the service account through the Exchange admin center

Create an unprivileged domain user (e.g. MailStore Server).

Log on to the Exchange admin center of your Microsoft Exchange environment.

Navigate to permissions.

Under admin roles select + (New).

Enter a meaningful name (e.g. MailStore Impersonation) and description for the new role group.

Under Roles add the role ApplicationImpersonation.

Under Members add the user you've created above.

Click on Save to create the new role group.

Continue with step 2.

Method 2: Setting up the service account through the Exchange Management Shell

Create an unprivileged domain user (e.g. mailstore@example.com).

Open a Microsoft Exchange Management Shell session on the Microsoft Exchange 2016 Server.

Step 2: Configuration of MailStore Server

From the Email Servers list in the Create Profile area of the window, select Microsoft Exchange to create a new archiving profile.

A wizard opens to assist in specifying the archiving settings.

Select Multiple Mailboxes.

Please note: In order to be able to archive multiple mailboxes, the MailStore users along with their email addresses have to exist in the MailStore user management. If this is not the case, MailStore will offer to set up and execute the directory synchronization at this point. Once completed, the wizard will resume.Alternatively, you can cancel the wizard and create users manually as described the in chapter User Management.

Under Access via, select the protocol to be used to access the Exchange server. Whenever possible, HTTPS should be used.

Please note: Depending on the protocol chosen there is the option to Ignore SSL Warnings. Generally, these warnings appear if an unofficial or self-signed certificate is used on the Exchange server.

Under Host, enter the name of your Exchange server.

Under User Name and Password, enter the access data of the service account that has access to all mailboxes to be archived.

Click on Next to continue.

If needed, adjust the settings for the List of Folders to be Archived, the filter and the Deletion Rules. By default, no emails will be deleted from the mailbox. The Timeout value only has to be adjusted in specific cases (e.g. with very slow servers). Please keep in mind that these settings apply to all mailboxes to be archived, as specified in the next step.

Select the users whose mailboxes are to be archived.

The following options are available:

All users with configured email addressChoose this option to archive the mailboxes of all users who are set up, along with their email addresses, in MailStore's user management.

All users except the followingChoose this option to exclude individual users (and thereby their Exchange mailboxes) from the archiving process, using the list of users below.

Only the following usersChoose this option to include individual users (and thereby their Exchange mailboxes) in the archiving process, using the list of users below. Only the mailboxes of those users explicitly specified will be archived.

Synchronize with Directory Services before archivingIf selected, the MailStore user list will be synchronized with the configured directory service before any archiving process is executed. This has the advantage that, for example, new employees will be created as MailStore users before archiving, so once the archiving process is executed, their Exchange mailbox is archived automatically as well. This option is especially recommended when the archiving process is to be executed automatically.

Click on Next.

In the last step, a name for the archiving profile can be specified. After clicking Finish, the archiving profile will be listed under Saved Profiles and can be run immediately or automatically, if desired.

Archiving Incoming and Outgoing Emails Directly

Together with the Microsoft Exchange 2016 journal function, MailStore can archive the incoming and outgoing emails of all users automatically. This is the only way to ensure that all emails are archived entirely.

Basic Functionality

The Microsoft Exchange 2016 journal function makes it possible to record all incoming, outgoing and internal email traffic. At the time of sending and receiving, a copy of the respective email is created by Microsoft Exchange 2016. The copy is then attached to a so-called journal report and stored in a special journal mailbox. The journal report contains information about the actual senders and recipients; Microsoft Exchange 2016 also resolves BCC recipients and distribution lists.

With the corresponding archiving profile MailStore can archive the journal mailbox automatically. During this process, MailStore parses the information in the journal reports and assigns the emails to their respective MailStore archives. Therefore even with journal archiving all users have access to their own emails only.

Step 1: Creating a Mailbox for Journaling

To set up a new Exchange user with a meaningful name, e.g. journal, please proceed as follows:

Log on to the Exchange admin center of your Microsoft Exchange environment as an Exchange administrator.

Choose the recipients menu item.

In the mailboxes section, click on + (New) and choose User mailbox.

Enter a valid Alias (e.g. journal).

Select the option New user.

Enter the necessary data to create a new user.

Click on More options...

Click on Browse to select a mailbox database.

Click on save. The new user as well as the corresponding mailbox are created.

Step 2: Configuring Exchange Journaling

Two types of journaling are available in Microsoft Exchange 2016, standard and premium journaling:

Standard journaling is configured on mailbox database level and records all sent and received emails of that database.

Alternative 1: Configure Standard Journaling

Log on to the Exchange admin center of your Microsoft Exchange environment.

Select the servers menu item.

On the databases tab, doubleclick on the mailbox database for which you want to set up journaling.

Select the maintenance tab.

Click on browse... next to the Journal recipient: box.

Select the user that was created in step 1 from the recipient list and confirm with OK.

Click on save to confirm the changes.

Alternative 2: Configure Premium Journaling

Log on to the Exchange admin center of your Microsoft Exchange environment.

Select the compliance management menu item.

On the journal rules tab, click on + (New).

The dialog window New Journal Rule opens:

Enter a name for the journal rule, e.g. Journaling.

In the If the message is sent to or received from... section select whether the rule should apply to all messages or to specific users or groups.

Under Journal the following messages..., choose whether to capture all messages, internally sent messages only, or only those messages with an external sender or recipient.

In the Send journal reports to: box, enter the email address of the user created in step 1.

Click on save to activate the rule. Please keep in mind that in complex Microsoft Exchange environments it may take several minutes until the new rule becomes effective.

Step 3: Configuration of MailStore Server

Please proceed as follows:

Log on to MailStore Client as MailStore administrator.

Click on Archive Email.

From the Email Servers list in the Create Profile area of the window, select Microsoft Exchange to create a new archiving profile.

A wizard opens to assist in specifying the archiving settings.

Select In- and Outbound Email Automatically.

Please note: In order to be able to archive from a journal mailbox, the MailStore users along with their email addresses have to exist in the MailStore user management. If this is not the case, MailStore will offer to set up and execute the directory synchronization at this point. Once completed, the wizard will resume.Alternatively, you can cancel the wizard and create users manually as described the in chapter User Management.

Under Access via, select the protocol to be used to access the Exchange server. Whenever possible, HTTPS should be used.

Please note: Depending on the protocol chosen, there is the option to Ignore SSL Warnings. Generally, these warnings appear if an unofficial or self-signed certificate is used on the server.

Under Host enter the name of the Exchange server.

Under User Name and Password enter the credentials for the Exchange journal mailbox.

If you want to access the journal mailbox through HTTP/HTTPS with credentials that are not those of the mailbox owner, you have to specify the primary email address of the journal mailbox in the field Mailbox (opt.).

Click on Test to verify that MailStore can access the mailbox.

Synchronize with Directory Services before archivingIf this option is enabled, the MailStore user list will be synchronized with configured directory service before the archiving process actually runs. This has the advantage that, for example, new employees will be created as MailStore users before archiving which enables MailStore to sort their emails into the correct archives. This option is recommended if you want to have the journal archiving job run automatically.

Messages with unknown e-mail addresses In this section you can configure whether to archive messages that contain only email addresses which do not belong to any MailStore user. By default, such emails will be archived into a catchall folder but you can select another folder through the Ellipsis (…).Alternatively, you can opt not to archive these emails at all.

When e-mails are successfully archivedEnabling the option Delete them in origin mailbox will delete emails automatically in the journal mailbox after they have been archived successfully by MailStore. The option has no effect whatsoever on the emails in the users' mailboxes.

Click on Next to continue.

A Timeout value can be specified. Change this value only in case of definite need (e.g. with very slow servers).

Click on Next to continue.

In the last, step a name for the archiving profile can be specified. After clicking Finish, the archiving profile will be listed under Saved Profiles and can be run immediately or automatically, if desired.

Public Folders

MailStore Server can archive the emails from the public folders of Exchange 2016 and make them available to some or all MailStore users. The archiving process can be executed manually or automatically.

Step 1: Creating a User Archive for Public Folders

Archived emails are always assigned to a particular user. You also need to specify a target archive when archiving a public folder.

As best practice, please create a dedicated MailStore user (e.g. publicfolder) whose archive acts as target for the public folder archiving profile. Through the MailStore privileges you can grant access to the archive of the user publicfolder to other MailStore users. This way the archived emails of the public folder are made available to those MailStore users.

You can find more information on how to create a new user in MailStore in the chapter User Management.

Step 2: Granting permissions on public folders in Exchange 2016

Accessing public folders needs an Exchange 2016 user that has a mailbox because the necessary permissions are implemented on mailbox level. If the above mentioned MailStore service account should be used for public folder access also, a mailbox has to be created for that account first.

To grant the Exchange 2016 user the necessary permissions, please proceed as follows:

Log on to the Exchange admin center of you Microsoft Exchange environment as an Exchange admin.

Navigate to public folders.

Click on the Ellipsis (…) and select Root permissions.

A new browser window opens. Click on + (Add).

Use Browse to choose the Exchange user you want to grant permissions.

Choose Custom as Permission level and grant Read items and Delete all permissions.

Click on Save.

Enable the option Apply changes to this public folder and all its subfolders.

Click on Save.

Click on Close after saving has been completed successfully.

Step 3: Setting up the Archiving Process

Please proceed as follows:

Log on to MailStore Client as administrator.

Click on Archive Email.

From the Email Servers list in the Create Profile area of the window, select Microsoft Exchange to create a new archiving profile.

A wizard opens to assist in specifying the archiving settings.

Select Public Folders.

Under Access via, either HTTPS or HTTP has to be selected as protocol to archive public folders.

Please note: If you choose HTTPS, you can enable the option to Ignore SSL Warnings. Generally, these warnings appear if an unofficial or self-signed certificate is used on the Exchange server.

Under Host, enter the name of your Exchange server.

Under User Name, enter the Windows login name of the user you have prepared in step 2 for public folder access.

If needed, adjust the filter and the Deletion Rules. By default, no emails will be deleted from the public folders. The Timeout value only has to be adjusted in specific cases (e.g. with very slow servers).

Click on Next to continue.

In the next step, select the archive of the user you have prepared in step 1.

In the last step, specify a name for the archiving profile. After clicking Finish the archiving profile will be listed under Saved Profiles and can be run immediately or automatically if desired.

Shared Mailboxes

Step 1: Creating a MailStore User for a Shared Mailbox

A shared mailbox is a special kind of mailbox that, unlike a normal mailbox, is associated with a disabled Active Directory account. Like for normal mailboxes, MailStore is able to create user entries for shared mailboxes via Active Directory Synchronization. For this, you have to deactivate the option Synchronize enabled users only in the section User Database Synchronization.
After synchronization you can grant MailStore users access to the archive of the shared mailbox by assigning privileges.

Step 2: Setting up the Archiving Process

In order to archive emails from a shared mailbox you must grant a user account full access to that mailbox (either by delegated access or impersonation) because the Active Directory user account associated with that mailbox is disabled. You can use the service account you created to archive multiple mailboxes for this purpose.

Once you have created the service account, setup a new Single Mailbox archiving profile. Enter the credentials of the service account and fill the optional Mailbox field with the primary e-mail address of your shared mailbox.

Archive Mailboxes

MailStore is not able to access Exchange archive mailboxes directly. To archive messages contained therein these have to be copied to a location that MailStore is able to read from. You can find more detailed information in this article.

Throttling in Exchange 2016

Exchange 2016 supports throttling since the RTM version. With throttling you can control on the Exchange side the speed and the amount of emails individual users can download from the Exchange server. This feature is enabled by default.

Determining the Throttling Policy Applied to the MailStore Service Account

To use the script, please copy the entire content into a text editor and save the script as policycheck.ps1, for example on the desktop of the Exchange server.

You can now run the script from the Exchange Management Shell with the UPN (User Principal Name) of the MailStore service account (e.g. mailstore@example.com) as parameter. Since, in the context of MailStore Server, only the EWS values are of any interest, the following result may be displayed:

In this case, no separate policy exists for the MailStore service account. The value 'Global' of the property ThrottlingPolicyScope indicates that the global throttling policy of the system applies to the MailStore service account mailstore@example.com as well. Had the value been 'Regular', the individual policy Name would already have been applied to the MailStore service account.

Creating and Assigning an Individual Throttling Policy

Because MailStore regularly establishes many connections to the Exchange server and may have to download large amounts of emails through its service account, the account should be exempt from the restrictions of the global throttling policy. You can achieve this by creating a dedicated throttling policy for the MailStore service account:

In line 1, a new throttling policy with the desired values is created, in line 2, this individual throttling policy is assigned to the MailStore service account.
The result can be checked again with the script listed above: