Difference between revisions of "Archiving Emails from Microsoft 365 (Modern Authentication)"

[unchecked revision][unchecked revision]
(Created page with "{{Implementation Guide Preamble|Exchange Online / Microsoft 365}} <p class="msnote">'''Please note:''' For better readability the term ''Exchange Online / Micro...")
 
Line 1: Line 1:
 
{{Implementation Guide Preamble|Exchange&nbsp;Online / Microsoft&nbsp;365}}
 
{{Implementation Guide Preamble|Exchange&nbsp;Online / Microsoft&nbsp;365}}
<p class="msnote">'''Please note:''' For better readability the term ''Exchange&nbsp;Online / Microsoft&nbsp;365'' hereinafter is being referred to as ''Microsoft&nbsp;365''.</p>
+
<p class="msnote">'''Please note:''' For better readability, the terms ''Microsoft&nbsp;365'' and ''Exchange&nbsp;Online'' are used interchangeably hereinafter instead of ''Exchange&nbsp;Online / Microsoft&nbsp;365''.</p>
  
 
== App Registration & User Synchronization ==
 
== App Registration & User Synchronization ==
Line 47: Line 47:
 
* If needed, adjust the settings for the [[Email_Archiving_with_MailStore_Basics#Archiving_Specific_Folders|List of Folders to be Archived]], the [[Email_Archiving_with_MailStore_Basics#Specifying_Filter_Criteria_for_Archiving|filter]] and the [[Email_Archiving_with_MailStore_Basics#Archiving_Specific_Folders|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 network connections). Please keep in mind that these settings apply to all mailboxes to be archived, as specified in the next step.
 
* If needed, adjust the settings for the [[Email_Archiving_with_MailStore_Basics#Archiving_Specific_Folders|List of Folders to be Archived]], the [[Email_Archiving_with_MailStore_Basics#Specifying_Filter_Criteria_for_Archiving|filter]] and the [[Email_Archiving_with_MailStore_Basics#Archiving_Specific_Folders|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 network connections). Please keep in mind that these settings apply to all mailboxes to be archived, as specified in the next step.
 
*; {{Archiving_Multiple_Mailboxes_Centrally_Options|Microsoft_365_mailboxes_04.png|Microsoft&nbsp;365}}
 
*; {{Archiving_Multiple_Mailboxes_Centrally_Options|Microsoft_365_mailboxes_04.png|Microsoft&nbsp;365}}
 +
 +
== Archiving Incoming and Outgoing Emails Directly ==
 +
{{Archiving Exchange Journal Mailbox Preamble|Exchange&nbsp;Online}}
 +
 +
=== Step 1: Setup and Configure MailStore Gateway ===
 +
Please refer to the [https://help.mailstore.com/en/gateway/ MailStore Gateway Manual] for detailed instructions about:
 +
 +
* Installation and Setup of MailStore Gateway
 +
* Logging on to MailStore Gateway's Management Console
 +
* Creating MailStore Gateway mailboxes
 +
 +
After these steps, a mailbox with an individual email address (e.g. mbx-dead1234beef5678@gateway.example.com) should exist.
 +
 +
=== Step 2: Configure MailStore Server ===
 +
{{Archiving MailStore Gateway Mailbox|''In- and Outbound E-Mail Automatically''|Microsoft 365 journal 01.png|Arch_MailStore_Gateway_Office365_02.png|''Microsoft&nbsp;365''|TargetFolderHint=DontShow|POP3Hint=DontShow|DSLink=[[#App_Registration_.26_User_Synchronization|directory synchronization]]}}
 +
 +
=== Step 3: Creating a Journal Rule ===
 +
The following steps describe how to set up journaling for your Microsoft&nbsp;365 account.
 +
 +
* Sign in to the [https://admin.microsoft.com/ Microsoft&nbsp;365 admin center] as an Exchange or Global Administrator for your Microsoft&nbsp;365 tenant.
 +
* In the ''Admin centers'' section, choose ''Exchange''.
 +
* In the ''Exchange admin center'', navigate to ''compliance management''.
 +
* Select ''journal rules''.
 +
* Under ''Send undeliverable journal reports to'' select an alternate journaling mailbox that receives None Delivery Reports (NDRs) for undeliverable journal reports in case the primary journal mailbox is unreachable. This mailbox must be a dedicated mailbox, any mail sent directly to this mailbox won't be journaled.
 +
* Click on ''+ (New)''.
 +
*:The dialog window ''new journal rule'' opens:
 +
*:[[File:Arch_office365_journal_01.png|center|550px]]
 +
* Enter a name for the journal rule, e.g. ''Journalling''.
 +
* 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.
 +
* Enter the email address of the previously created MailStore Gateway mailbox in the ''Send journal reports to:'' box.
 +
* Click on ''Save'' to activate the rule.

Revision as of 06:03, 10 July 2020

This implementation guide covers the specifics of archiving Exchange Online / Microsoft 365 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 Exchange Online / Microsoft 365 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.

Please note: For better readability, the terms Microsoft 365 and Exchange Online are used interchangeably hereinafter instead of Exchange Online / Microsoft 365.

App Registration & User Synchronization

Before archiving Microsoft 365 mailboxes, registering MailStore Server in your Microsoft 365 tenant is required. It is also highly recommended to synchronize users in MailStore Server directly with that tenant to fetch all information that is relevant for archiving such as email addresses. The registration and synchronization procedures are described in the chapter Synchronizing User Accounts with Microsoft 365 (Modern Authentication) of the MailStore Server manual.

Please note: MailStore Server runs as a Windows service and thus must use Application Permissions to access user mailboxes in Microsoft 365. By design, on the Microsoft identity platform, which is at the heart of Microsoft 365 authentication and authorization, this permission scope encloses the full level of privileges implied by a permission. As a consequence, once registered as described above, MailStore Server has access to all mailboxes in your Microsoft 365 tenant. Therefore, with regard to security, access to the Microsoft 365 archiving profiles in MailStore Server is limited to MailStore Server administrators.

Archiving Individual Microsoft 365 Mailboxes

In MailStore Server Microsoft 365 archiving tasks are stored in archiving profiles. By following the procedure described here you can archive a single Microsoft 365 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:

  • Log on to MailStore Client as MailStore Server administrator.
  • Click on Archive Email.
  • From the Email Servers list in the Create Profile area of the Archive Email page, select Microsoft 365 to create a new archiving profile.
  • A wizard opens to assist in specifying the archiving settings.

    Microsoft 365 mailbox 01.png
  • Select Single Mailbox.
    Microsoft 365 mailbox 02.png
  • Select the Microsoft 365 credentials that you have created during the registration of MailStore Server with Microsoft 365 from the Credentials drop-down list. You can also use the button (…) to access the Credential Manager.
  • In the Mailbox field, enter the primary email address of the user whose mailbox you want to archive.
  • Click on Test to verify that MailStore Server 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 network connections).
    Microsoft 365 mailbox 03.png
  • Click on Next to continue.
  • 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….
    Microsoft 365 mailbox 04.png
  • 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 Microsoft 365 Mailboxes Centrally

With MailStore, some or all Microsoft 365 mailboxes can be archived in a single step.

Please proceed as follows:

  • Log on to MailStore Client as MailStore Server administrator.
  • Click on Archive Email.
  • From the Email Servers list in the Create Profile area of the Archive Email page, select Microsoft 365 to create a new archiving profile.
  • A wizard opens to assist in specifying the archiving settings.

    Microsoft 365 mailboxes 01.png
  • Select Multiple Mailboxes and click OK.

    Please note: To be able to archive multiple mailboxes, MailStore Server users along with their email addresses must exist in the MailStore Server user management. If this is not the case, MailStore Server will offer to set up and run 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.

    Microsoft 365 mailboxes 02.png
  • Select the Microsoft 365 credentials that you have created during the registration of MailStore Server with Microsoft 365 from the Credentials drop-down list. You can also use the button (…) to access the Credential Manager.
  • Click on Next to continue.
    Microsoft 365 mailboxes 03.png
  • 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 network connections). 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.
    Microsoft 365 mailboxes 04.png
    The following options are available:
    • All users with configured email address
      Choose 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 following
      Choose this option to exclude individual users (and thereby their Microsoft 365 mailboxes) from the archiving process, using the list of users below.
    • Only the following users
      Choose this option to include individual users (and thereby their Microsoft 365 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 archiving
      If 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 Microsoft 365 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 Exchange Online 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 Exchange Online 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 Exchange Online. 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; Exchange Online 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: Setup and Configure MailStore Gateway

Please refer to the MailStore Gateway Manual for detailed instructions about:

  • Installation and Setup of MailStore Gateway
  • Logging on to MailStore Gateway's Management Console
  • Creating MailStore Gateway mailboxes

After these steps, a mailbox with an individual email address (e.g. mbx-dead1234beef5678@gateway.example.com) should exist.

Step 2: Configure MailStore Server

Setting up archiving processes for MailStore Gateway mailboxes is done using archiving profiles. General information about archiving profiles is available in chapter Working with Archiving Profiles.

Before configuring MailStore Server, please make sure that a MailStore Server user account exists for each user whose emails are to be archived with the MailStore Gateway. Please refer to chapter User Management for more information.

Important notice: It is imperative that, in user management under Properties, the email address is specified for each user. This is the only way to make sure that the emails in the archive are assigned to the appropriate users.

Please proceed as follows:

  • Log on as MailStore Server administrator using MailStore Client.
  • In MailStore Server, click on Archive Email.
  • To create a new archiving profile, select Microsoft 365 from the Email Server list in the Create Profile area of the application window.
  • A wizard opens that guides you through the setup process.

    Microsoft 365 journal 01.png
  • Select In- and Outbound E-Mail Automatically and click OK.

    Please note: To be able to archive a MailStore Gateway mailbox, MailStore Server users along with their email addresses must exist in the MailStore Server user management. If this is not the case, MailStore Server will offer to set up and run 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.

  • Fill out the fields Host, Mailbox ID and Password. Click on Test to verify the data entered.

    If MailStore Gateway uses a TLS certificate from a certificate authority that is not trusted by the MailStore Server computer, the option Accept all certificates must be checked.

    Arch MailStore Gateway Office365 02.png
  • Adjust any further settings such as how to handle emails with unknown addresses or asking MailStore Server to delete emails after they have been archived.
  • If the option Synchronize with Directory Services before archiving is enabled, the MailStore Server user list will be synchronized with the configured directory service before the archiving process actually runs. This has the advantage that, for example, new employees will be created as MailStore Server users before archiving which enables MailStore Server to sort their emails into the correct archives.
  • Click on Next.
  • The timeout value only has to be adjusted on a case-by-case basis (e.g. with very slow servers or network connections).
  • Click on Next.
  • At the last step, select a name for the new archiving profile. After clicking on Finish, the archiving profile will be listed under Saved Profiles and can be run immediately or automatically, if desired.


Step 3: Creating a Journal Rule

The following steps describe how to set up journaling for your Microsoft 365 account.

  • Sign in to the Microsoft 365 admin center as an Exchange or Global Administrator for your Microsoft 365 tenant.
  • In the Admin centers section, choose Exchange.
  • In the Exchange admin center, navigate to compliance management.
  • Select journal rules.
  • Under Send undeliverable journal reports to select an alternate journaling mailbox that receives None Delivery Reports (NDRs) for undeliverable journal reports in case the primary journal mailbox is unreachable. This mailbox must be a dedicated mailbox, any mail sent directly to this mailbox won't be journaled.
  • Click on + (New).
    The dialog window new journal rule opens:
    Arch office365 journal 01.png
  • Enter a name for the journal rule, e.g. Journalling.
  • 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.
  • Enter the email address of the previously created MailStore Gateway mailbox in the Send journal reports to: box.
  • Click on Save to activate the rule.