Difference between revisions of "Archiving Emails from Microsoft 365 - Basic Authentication"

[unchecked revision][unchecked revision]
m
Line 18: Line 18:
 
<p class=msnote>'''Important notice:''' Archiving multiple mailboxes requires the Exchange Online features ''EWS Application support'' and ''Role-Based Permissions''. Please make sure that your Office 365 plan supports these features. More information is available in this [https://technet.microsoft.com/en-us/library/exchange-online-service-description.aspx TechNet article].</p>
 
<p class=msnote>'''Important notice:''' Archiving multiple mailboxes requires the Exchange Online features ''EWS Application support'' and ''Role-Based Permissions''. Please make sure that your Office 365 plan supports these features. More information is available in this [https://technet.microsoft.com/en-us/library/exchange-online-service-description.aspx TechNet article].</p>
  
=== Step 1: Setting up a central user for accessing mailboxes ===
+
=== Step 1: Setting up a service account for accessing mailboxes ===
Before the archiving process can be set up in MailStore, you have to create a user that has access to all mailboxes.  
+
To be able to archive multiple Office 365 mailboxes, you need to create an Office 365 user first. Afterwards follow these steps, to grant access permissions to the newly created user on all mailboxes:
Afterwards follow these steps, to grant access permissions to the newly created user on all mailboxes:
 
  
* Log into Microsoft's Online Portal with your Office 365 admin account.
+
* Log on to your Office 365 tenant through Microsoft's Online Portal with an admin account.
* Click on ''Admin'' and select ''Exchange'' from the drop down menu.
+
* In the ''Office 365 admin center'' choose ''ADMIN > Exchange''.
* Navigate to ''Permissions''.
+
* Now, in the ''Exchange admin center'', navigate to ''permissions''.
 
* Under ''admin roles'' select ''+ (New)''.
 
* Under ''admin roles'' select ''+ (New)''.
*: [[Image:Arch_office365_multi_01_en.png|center|550px]]
+
*: [[Image:Arch_office365_multi_01.png|center|550px]]
* Enter a meaningful name and description for the new role group.
+
* Enter a meaningful name (e.g. ''MailStore Impersonation'') and description for the new role group.
 
* Under ''Roles'' add the role ''ApplicationImpersonation''.
 
* Under ''Roles'' add the role ''ApplicationImpersonation''.
 
* Under ''Members'' add the user you want to give permission to access all mailboxes.
 
* Under ''Members'' add the user you want to give permission to access all mailboxes.

Revision as of 09:13, 26 June 2015

This implementation guide covers the specifics of archiving Exchange Online / Office 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 / Office 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 term Exchange Online / Office 365 hereinafter is being referred to as Office 365.

Synchronizing Users

MailStore offers direct user synchronization support for Office 365. The setup procedure for the required service principal is described in the chapter Office 365 Integration of the MailStore Server manual.

Note that while Office 365 manages users in Azure Active Directory, this itself can be synchronized with on-premise user information. Even if Office 365 / Azure AD is not the primary source of user account information in your environment, it is highly recommended to synchronize MailStore directly with Office 365 to fetch all information that is relevant for archiving such as email addresses.

Archiving Individual Office 365 Mailboxes

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

Important notice: Archiving a single mailbox requires the Exchange Online feature EWS Application support. Please make sure that your Office 365 plan supports this feature. More information is available in this TechNet article.

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.
    Office365 mailbox 01.png
  • Leave the protocol under Access via on HTTPS. Also the option Ignore SSL Warnings should be left deactivated because Office 365 uses official certificates.
  • Leave the setting of Host to its default (Auto Detect).
  • Under User Name, enter the Office 365 login name of the user whose emails are to be archived (e.g. [email protected]).
    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 Office 365 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).
    Xchg mailbox 03.png

    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, Calendar 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.
    Xchg mailbox 02.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 Office 365 Mailboxes Centrally

With MailStore, some or all Office 365 mailboxes can be archived in a single step.
Before the archiving process can be set up in MailStore, a service account needs to be created that has access to all mailboxes.

Important notice: Archiving multiple mailboxes requires the Exchange Online features EWS Application support and Role-Based Permissions. Please make sure that your Office 365 plan supports these features. More information is available in this TechNet article.

Step 1: Setting up a service account for accessing mailboxes

To be able to archive multiple Office 365 mailboxes, you need to create an Office 365 user first. Afterwards follow these steps, to grant access permissions to the newly created user on all mailboxes:

  • Log on to your Office 365 tenant through Microsoft's Online Portal with an admin account.
  • In the Office 365 admin center choose ADMIN > Exchange.
  • Now, in the Exchange admin center, navigate to permissions.
  • Under admin roles select + (New).
    Arch office365 multi 01.png
  • 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 want to give permission to access all mailboxes.
  • Click on Save to create the new role group.

Step 2: 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 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.
    Office365 mailboxes 01.png
  • Leave the protocol under Access via on HTTPS. Also the option Accept all certificates should be left deactivated because Office 365 uses official certificates.
  • Leave the setting of Host to its default (Auto Detect).
  • 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.
    Xchg 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 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.
    Xchg mailboxes 02.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 Office 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 Office 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 Office 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

With the support of Office 365 Exchange's 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 in their entirety

Important notice: The Office 365 Exchange's journal function, which is required to archive incoming and outgoing emails directly, is only available in certain Office 365 plans.

Basic Functionality

Microsoft Office 365 Exchange provides the option to take down all incoming, outgoing and internal email traffic. At the time of sending and receiving, a copy of the respective email is created and stored in a mailbox called Journal Mailbox. Additionally, the email is provided with a Journal report containing information about the actual senders and recipients.

MailStore can be configured to archive this Journal mailbox at regular intervals. During this process, the emails from the Journal mailbox will be assigned to their respective MailStore users (i.e. their user archives) automatically. This means that all users are able to view only their own emails.

Before the archiving process can be set up in MailStore, journaling has to be set up for the Office 365 Exchange environment. Please proceed as follows:

Step 1: Creating a Mailbox for Journaling

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

  • Log into Microsoft's Online Portal with your Office 365 admin account.
  • Click on Admin and select Exchange from the drop down menu.
  • Click on compliance management and then on journal rules.

Click on + (New)

  • The dialog window New Journal Rule opens:
    Arch office365 journal 01 en.png
  • 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.
  • Enter the email address of the previously created journal user in the Send journal reports to: box.
  • Click on save to activate the rule.
  • If you have not set up a recipient for None Delivery Reports (NDRs) for undeliverable journal reports yet, you are asked to do it now. Just follow the onscreen instructions.

Step 2: Configuration of MailStore Server

Setting up the archiving profile is very similar to a non-hosted Exchange 2010 environment.

Important notice: Office 365 currently supports only external, Non-Office 365 mailboxes as journal mailboxes. In case the journal mailbox is a regular IMAP mailbox, you still have to select Microsoft Exchange > In- and Outbound E-mail Automatically under Archive E-mail in order to ensure that MailStore processes the journal reports correctly. Access via usually needs to be set to IMAP, IMAP-TLS or IMAP-SSL. The provider of such an IMAP mailbox must not remove the X-MS-Journal-Report header from the journal emails.

Please note that MailStore Server is not able to delete Office 365 journal emails from GMail mailboxes.

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: To be able to archive from a journal 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.
    Xchg jour mailstore 01.png
  • Under Access via, select the protocol to be used to access the Exchange server. Whenever possible, HTTPS should be used.
    Please note: 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.
  • 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 archiving
    If 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 archived
    Enabling 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.


Weblinks