5.4 Exchange Module On-Premise Exchange

5.4.1 Supported Exchange Forest Configurations

Retain supports:

  • A single forest Active Directory system, (Exchange and standard users)

  • An Exchange Resource Forest, (One Exchange Forest linked to one or multiple User Forests)

Retain does NOT support multiple linked Exchange Forests. Ensure that the Exchange Settings have been configured correctly before continuing the Exchange module setup.

5.4.2 Exchange Prerequisites required for Retain

There are several prerequisites that need to be done in Exchange for Retain to successfully archive the mailbox databases:

  • A mailbox user with ApplicationImpersonation rights

  • Basic Authentication enabled for Autodiscover and EWS on all Client Access Servers

  • A DNS SRV record

  • Set the DNS used by the Retain server to be the same as used by Exchange.

  • Set a Rolling In-Place Hold to retain data until Retain can archive it.

  • If "Configure email forwarding for a mailbox" is in use, enable "Deliver messages to both forwarding address and mailbox", otherwise no messages will be stored in Exchange and Retain will never be able to archive any messages.

5.4.3 Create a Retain User

To connect with Exchange, Retain needs a user with appropriate rights. This can be accomplished by using an existing user, or by creating a new one. It is recommended to create a new user for Retain archiving. If creating a new user, ensure that the user is an active user account and that the password does not change to ensure Retain will be able to access mail without changing settings. This user is sometimes called a ‘service account’. Retain calls this user the ‘global catalog user’.

The user created or used for Retain must be a “mailbox-enabled user” with read access to see all other users, groups, resources, and Exchange Servers in the Exchange Forest. The user will be utilized by both the Retain Server and Worker for LDAP lookups in Active Directory. The Retain user also must have Exchange impersonation rights to every mailbox user on every server in the organization to be archived. The Retain user MUST NOT be a member of any Exchange Administrator group, as Exchange denies impersonation rights for all administrator accounts.

Additional permissions need to be added to the user created for Retain. The quickest way to add these rights is through the Exchange Management Shell.

After creating the new user in Active Directory, open the Exchange Management Shell.

5.4.4 Grant Impersonation Permissions to the Retain user.

In Exchange 2013 and 2016 Impersonation permissions can be granted in the Exchange Admin Center under Permissions.

Under Admin Roles create a new role (e.g. Retain Impersonation Management). Add the role "ApplicationImpersonation" and add the Retain User as a member.

You can also accomplish this via PowerShell commands using the Exchange Management Shell.

The commands required are different depending on the version of the Exchange Server. Exchange 2010, and 2013 require only one command per Exchange system to be issued, whereas Exchange 2007 requires the commands to be run on every Exchange server in the Exchange system to grant required permissions. If the Exchange system contains mixed 2007, 2010, and 2013 servers, the different commands must be completed on one server of each type.

Exchange 2010, 2013, and 2016 commands

For Exchange 2010, 2013, and 2016 the only command necessary for impersonation permissions is:

New-ManagementRoleAssignment –name ImpersonationAssignmentName –Role ApplicationImpersonation –User ServiceAccount

Where the ‘Name’ is a name chosen by the administrator and the ‘ServiceAccount’ is the name of the Retain user.

For Example:

New-ManagementRoleAssignment –Name impersonation-retain -Role ApplicationImpersonation -UserRetain

If additional Exchange servers are added to the system after running this command to grant rights to the ‘retain’ user, the command must be run again to grant rights to the new server.

5.4.5 Room and Equipment Resources

To archive Room and Equipment Resources, or to restore them, the Retain user, or Service Account, must also have delegation rights. These commands must be issued manually for each Room and Equipment or resource mailbox on every relevant server. This is required for 2013 and 2016.

These commands must be issued:

(‘Retain’ is used here as the name of the Service Account, or Retain user, and the ‘Mailbox Database’ should be changed to the appropriate name.)

(NOTE: every time a new Room and Equipment or resource mailbox is added, the first command must be re-run.)

Exchange 2013 and 2016 Powershell commands

Get-Mailbox –ResultSize Unlimited –Database “Mailbox Database” | Add-MailboxPermission –User “Retain” –AccessRights FullAccess

Add-ADPermission –Identity “Mailbox Database” –User “Retain” –ExtendedRights Receive-As

Add-ADPermission –Identity “Mailbox Database” –User “Retain” –ExtendedRights Send-As

5.4.6 Basic Authentication

Retain requires Basic Authentication to be enabled on each CAS Exchange server in the system for Autodiscover and EWS.

In Exchange Admin Center, go to Servers, then go to the Virtual Directories tab.

  1. Edit Autodiscover and under Authentication enable Basic authentication if it is not enabled.

  2. Edit EWS and under Authentication enable Basic authentication if it is not enabled.

  3. Do this for each server in the list.

To check if this worked, run the following PowerShell cmdlets:

For EWS:

Get-WebServicesVirtualDirectory | ft server,basicauthentication

For Autodiscover:

Get-AutoDiscoverVirtualDirectory | ft server,basicauthentication

On Exchange systems prior to 2013 you may need to set basic authentication manually.

Open “Server Manager” on Exchange server.

  1. In left pane, expand “Roles”, expand “Web Server (IIS)”, select “Internet Information Services (IIS) Manager”.

  2. A new “Connections” pane opens, expand your Exchange server object, expand “Sites”, expand “Default Web Site (Multiple Protocols)”, select “EWS”.

  3. Under heading “IIS”, open “Authentication” icon

  4. Select “Basic Authentication”, click “Enable” in right pane.

    You can now close “Server Manager”.

DNS SRV Record

Microsoft has an article describing how to set up a DNS SRV record titled "A new feature is available that enables Outlook 2007 to use DNS Service Location (SRV) records to locate the Exchange Autodiscover service".

In general, you will need to:

  1. Go to the DNS Manager

  2. Expand Forward Lookup Zones

  3. Locate and right-click on the external DNS zone and choose Other New Records

  4. Click Service Location (SRV) and enter:

    Service: _autodiscover
    Protocol: _tcp
    Port Number: 443
    Host: [your mail host, e.g. mail.gwava.net, usually the AD domain forest found in AD Domains and Trusts on the MS AD server]
  5. Click OK

The Microsoft autodiscover library in Retain expects a URL along the lines of https://autodiscover.[your domain]/Autodiscover/Autodiscover.xml (e.g., https://autodiscover.xyzcompany.com/Autodiscover/Autodiscover.xml), which can be found in the worker log as it attempts to login by searching for "Discovered endpoint:" or "AutoDiscover".

Server DNS Setting

Retain has best performance when the server's network setting is using the same DNS as the Exchange servers.

If Retain and Exchange must use different DNS, on the DNS that Retain uses, create a Conditional Forwarder that resolves to the Exchange server.

Set Rolling In-Place Hold

To prevent data loss, it is highly recommended that a rolling In-Place or Litigation Hold be set so users are unable to remove items from disk before Retain has a chance to archive them.

In Exchange by default, when a user deletes a message out of Outlook, it is moved to the trash. When they empty the trash, the item is moved to the mostly hidden Recoverable Items folder, where it is kept for 14 day before being removed from disk. The user can then right-click the Trash to recover items, and in that dialog box they can purge the item which will delete it immediately. With a hold in place that item will be moved to a Purged folder that is not user accessible, where it will be kept until the hold is lifted.

In Retain, set Profile/Miscellaneous to Include user's recoverable items.

In Exchange Admin Console, set up a distribution list, for example All_Mailboxes, that contains all mailboxes. It will be best to create a policy to add new users to this distribution list by default.

Place the distribution list under a 90-day hold.

In the Exchange Management Shell:

An In-Place Hold can be set up for all mailboxes for 90 days:

New-MailboxSearch "Retain90DayHold" -ItemHoldPeriod 90 -InPlaceHoldEnabled $true -SourceMailboxes All_Mailboxes

It will take time for the hold to take effect. You can determine how many mailboxes were placed under hold with the script:

((Get-Mailbox).InPlaceHolds).Count

5.4.7 Configure Exchange Module for On-Premise Exchange

The Exchange module must be configured in the Retain Server before any communication between Retain and an existing Exchange message system can occur. Open the Retain management page on the Retain Server, and select Module Configuration.

Select the ‘Configure’ option in the Exchange module. A new window or tab will open with the module configuration.

NOTE:Ensure that your Retain Server DNS is set to the same DNS server that your Exchange server uses. The Exchange module uses these DNS setting to auto discover critical information about Exchange stored in Active Directory and will not function correctly unless both systems are pointed to the same DNS server.

5.4.8 Core Settings

The module needs to be enabled on this page to make it active in the Retain system.

The module can be given a name.

The Send Method option enables either the SMTP Forwarding or FTP features. For either feature to appear and function, the Module Forwarding tab must be configured on the Server Configuration page. See that section for more information.

Normally all the checkboxes on this tab are always left selected. It is rare that you would ever deselect any of them. Two cases where you might, would be: troubleshooting (as instructed by Technical Support), or retrieving an old email system.

The Enable Address Book Caching function allows Retain to regularly cache the online email systems address book and synchronize it with Retain. This is critical for administration, authentication, and archiving purposes. It is recommended to cache the Address Book once every 24 hours to keep the Retain storage system up to date. By default, maintenance is set to cache the Address Book once every 24 hours.

The Enable Authentication checkbox determines if end-user authentication is performed when the user logs into Retain. If it is deselected, the Retain system will NOT authenticate the user against the email system and the user will not be able to log in unless another authentication method is enabled.

The Enable Jobs checkbox determines if configured data retrieval jobs are ever passed to the Worker. Even if the individual job is fully configured and enabled, if this checkbox is switched off, no jobs configured for this module will be processed.

The Message body allows the administrator to decide whether to store either the HTML or plain text message body, or both.

Send Method

The Send Method option enables either the SMTP Forwarding or FTP features. For either feature to appear and function, the Module Forwarding tab must be configured on the Server Configuration page. See that section for more information.

5.4.9 Impersonation

If the Impersonation and Core Settings tabs are not completely configured with the correct information, the hosted system will not be archived correctly.

5.4.10 Hosted Services

This tab is not used with an On-premise Exchange system.

5.4.11 Exchange Forest

Retain needs to know where to access the Global Catalog Host and existing domains before any archiving can be accomplished.

Open the “Exchange Forest” tab and enter the IP address or hostname of the Global Catalog Host.

Click on the Green Plus sign to add a search base. This should be set to the highest level of the LDAP domain so the entire address book can be found. For example: DC=exchange2013,DC=qa,DC=gwava,DC=com

Retain uses Active Directory extensively when integrating with Exchange. Its uses include: populating the address book, authentication, and access to the Exchange System.

There are settings required for Exchange, see the Exchange Permissions required for Retain section.

On the Exchange Forest tab, you configure all the Active Directory information you need for an Exchange forest. There is no need to fill out any information on the User Forest tab unless the users exist in a separate forest from the Exchange Forest.

On the Exchange Forest tab, specify whether to use SSL or not for the Global Catalog Security and the search base, (use of SSL with the Global Catalog Security and search base is highly recommended). The search base is the LDAP path to the base of where Retain will start searching for valid Exchange users.

The Global Catalog Port defaults depend on whether SSL is used for security or not. (SSL is strongly recommended. Default ports are 3268 for plain text, and 3269 for SSL.) Adjust as appropriate for your system.

You also must provide the credentials of an Active Directory user. This user is special It must have full read rights to Active Directory, be a mailbox-enabled, user, and be granted various Impersonation and Delegation rights. More on this is discussed in the Exchange Permissions required for Retain section. The username must be in UPN format, (user principal name).

This search base, in LDAP form, must be high enough in the tree to include ALL users, groups, and servers. Multiple search bases can be specified, though it often results in a less efficient interface. These are LDAP search bases which allow Retain to resolve all users, groups, and servers of interest in the forest.

After the Search Base has been added, test the connection to ensure information and connection works. The test performs a simple login to confirm that the user exists, the Exchange Server is reachable, and that the credentials are accepted. The test does not confirm impersonation or delegation rights necessary for the Service Account.

If the test results in an error stating: “FAILURE: User doesn't exist or is not mail enabled,” It indicates that the user’s mailbox is unavailable. A mailbox is not required for Retain to utilize the specified user. If the user Retain utilizes does not have a mailbox, this error may be ignored. However, if the user specified does have a mailbox, this may indicate connection issues.

If the test results in an error with an LDAP error code 49 it is an authentication error. The important bit of information is what comes after the data field. That is the LDAP connection error code that applies to this case.

  • 525 user not found

  • 52e invalid credentials

  • 530 not permitted to logon at this time

  • 531 not permitted to logon at this workstation

  • 532 password expired

  • 533 account disabled

  • 701 account expired

  • 773 user must reset password

  • 775 user account locked

The Exchange Forest tab is the only tab required by the Server and the Worker to archive mail from the Exchange system. The User Forest tab, however, is required for Exchange systems utilizing a resource forest, to allow the end user to log into Retain.

If the system contains a Resource Forest, enable the checkbox on the Exchange Forest tab and save changes. If the Resource Forest checkbox is not enabled, the User Forests tab will be non-functional and all settings contained on that tab will be ignored. The checkbox must be unchecked in a single forest Active Directory deployment, but must be checked in a multiple forest Active Directory deployment.

Check all information to ensure that it is correct and save changes, and then configure the User Forest if required.

User Forest

The User Forest must have an entry for each user forest attached to the system.

Select the green ‘+’ button and input the LDAP information required by the Forests’ Global Catalog server: IP address or hostname, port, security, (SSL is strongly recommended), and all search bases to include all the users. No administrative credentials are required. Each end user’s provided credentials will be used on login.

Delegates

You can set Retain to use delegate rights with On-Premise Exchange.

5.4.12 Finishing On-Premise Exchange

Save all changes before closing the Exchange Module page.

5.4.13 Refresh Address Book

After saving changes, return to the Retain Server's Module Configuration page, and trigger a refresh of the Address Book.

Depending on the size of the address book, it may take several minutes to return with information, but a successful configuration will return a correct address book cache date and no errors. The date should reflect the date of when the address book refresh was triggered.

The Status may show “Address Book Cache Never Run” or may list commonly misconfigured or missed items if the Refresh job fails.

Once the status is configured and the Address Book has been cached, Retain can connect to and archive messages from the Exchange server. The system is ready to have workers, schedules, profiles, and jobs configured, and those options will now appear on the main administrative interface.

The Address Book is refreshed whenever the button is pressed, during the nightly maintenance cycle, and before each job.

5.4.14 Exchange Profile

The job will need an Exchange profile setup to connect to the email system properly.

After the Exchange Module has been configured, the Exchange Profile will be available for configuration. If an Exchange Profile is not configured, jobs cannot be run against the Exchange system.

Click on “Add Profile” and provide a profile name, or select an already existing profile to access the configuration tabs. All changes made on this page must be saved by selecting the “save changes”, disk icon, at the top right of the page. Tabs may be changed and navigated through without affecting new settings, but any move to another page will require saving, or abandoning the changes made.

5.4.15 Core Settings

The core settings consist of an enabled/disabled option which must be enabled for any jobs based on this profile to archive anything.

5.4.16 Messaging System Deletion

For systems where the administrator wishes to have archived messages removed from the system automatically, the Messaging System Deletion option may be used. Messaging System Deletion will remove messages from a mailbox after they are archived, according to the time frame specified in the settings. The amount of time to keep messages is specified in days. The recommended setting depends on the archiving scheme in the system. For instance, if messages are to persist in the system for 30 days, then the system deletion setting should be set to 30 and enabled. A setting of 0 will remove messages from the system as soon as they are archived. Be sure to configure the system before enabling the setting in the profile.

5.4.17 Message Settings

Retain can archive and select specific types of mail and Exchange system items to be archived. The Manage Settings tab provides access to manage those settings.

The Mailbox type specifies whether to include or exclude the available types of mailboxes. Because there can be multiple profiles and jobs, it may be advantageous to archive the Users and Room / Equipment mailboxes separately as needed and appropriate for the system.

The Item Type option specifies the different types of messages found in Exchange that can be archived, and allows the exclusion of or inclusion of the different individual types.

The Item Source option allows administrators to exclude or include messages that have not yet been sent or received, or posted.

The Message Status allows messages which have or have not been read or opened, or marked private or confidential to be archived. The different options in the drop-down menu are as shown.

5.4.18 Scope

The Scope tab dictates the date range Retain will scan in the attached archiving jobs.

Date Range to Scan

The Date Range to Scan instructs Retain to scan for, and archive, messages after, or before, a certain date. This is useful if only specific chunks or areas of mail are to be archived.

New Items: All items that have not been archived by Retain since the last time the job ran.

All Items in Mailbox: All items in the mailbox starting from 1/1/1970, duplicates will be processed but not stored if they already exist in Retain's archive.

Number of days before job start date and newer: Only items from the relative number of days from the time the job began will be archived. E.g. messages that came into the email system less than 7 days ago.

Number of days from job start date and older: Only items before the relative number of days from the time the job began will be archived. E.g. messages that came into the email system more than 7 days ago.

Specify custom date range: Only items between two absolute dates will be dredged.

Specify custom date range relative to job start: Only items between two relative dates will be dredged. E.g. messages that came into the email system between 7 and 5 days ago.

It is recommended to archive all New items.

Advance Flags

Enabling "Don't Advance Timestamp" will not update the timestamp flag. Items that are dredged will still be considered new by Retain the next time the job runs.

This is useful when troubleshooting, but is generally not used for normal jobs.

NOTE:Unlike GroupWise, Exchange does not ensure any compliance when scanning end user mailboxes; users may freely delete their email. The Item store flag does not prevent mail deletion. Only setting a rolling hold on all mailboxes, or journaling and archiving a journaling mailbox guarantees all items have been archived.

5.4.19 Miscellaneous

The Miscellaneous tab allows access to settings detailing how messages are stored and what is archived. Attachments, message information such as the Internet headers, and how the data is stored and named, (by folders, year, or year and month), dictate not only the message store structure, but affect the storage size.

Miscellaneous options also allow for the archiving of the ‘recoverable items’. To enable checking and archiving of the ‘Recoverable Items’ for compliance reasons, select the checkbox next to the option.

5.4.20 Advanced

The Advanced tab allows you to limit what is stored by Retain. This must be used with caution as this opens holes for data to be lost through. It is recommended to store everything since storage space is inexpensive.

Advanced Criteria

If you want to be more specific as to what to dredge or not to dredge, add the criteria here. Each line will be logically AND-ed together. Think “Dredge all items where the following is true:” Criteria A AND Criteria B AND Criteria C AND etc.

You may select based on:

  • Subject

  • Sender

  • Recipient

  • Attachment Size (in bytes)

  • Attachment Name

  • Category

And whether they are equal to, not equal to, contain or do not contain the item you specify.

This gives you great flexibility and granularity. It allows you to customize dredges and retention for many different groups, or even individuals.

5.4.21 Folder Scope

By default, we dredge items from all folders. You can specify one or more inclusions or exclusions.

Your choices are:

  • Dredge everything

  • Dredge only these listed folders

  • Dredge everything except these listed folders

How to specify the list of folders to dredge/exclude:

  1. Specify a System Folder (mandatory). Example: Calendar.

  2. You specify a subfolder of that folder (optional).

    Example: entering “old” would mean the folder “old” under “Calendar”.

  3. You can have multiple hierarchies under that with the / delimiter.

    Example: “old/mail” would mean the subfolder “mail” under “old” under “Calendar”.

  4. You specify if the option includes subfolder.

    Example: If you select “old” and “includes subfolder” is unchecked, “Calendar/mail” is selected. If “includes subfolder” is CHECKED, “Calendar/old/mail” would also be selected.

You may now configure Schedules, Workers and Jobs.

5.4.22 Distributions Lists

You can create distribution list in Exchange Admin Center to manage information dissemination. Retain will query Exchange for a list of users in each distribution list. While you can create a distribution list in Active Directory Users and Computers these changes will not be reflected in Exchange therefore Retain will not see them. If you wish to rename a distribution group it needs to be done in Exchange or Retain will not see it either.

Distribution lists can be hidden in Exchange. If a distribution list is hidden, Retain will not be able to see the users associated with the distribution list and will not be able to archive the distribution list. The distribution list will be marked as (hidden) in Job | Mailboxes | Distribution Lists.

Dynamic Distribution Lists cannot be seen by Retain as they only create a user list at the time the message is sent. So, it is more of a filter then a list. Remember to refresh the address book if you wish to see the latest list changes.

5.4.23 Exchange Message Dredging Process Overview

How does Retain get messages from Exchange?

  1. When a job starts, the Retain Worker will query the DNS for the SCP record to the URL of the Active Directory Global Catalog Host.

  2. Then the worker queries Active Directory for the Autodiscover SCP Records and Active Directory returns the Autodiscover URLs. The URLs tell Retain where to connect to autodiscover. There are also some default autodiscover URLs that Retain uses to connect to autodiscover.

  3. Retain then uses autodiscover to connect to the Client Access Server. It is helpful to have an autodiscover SRV record on the DNS to speed up this process.

  4. Once Retain has connected to the Client Access Server (CAS), the CAS uses EWS to connect Retain to the correct Mailbox Server.

  5. Retain uses the impersonation user credentials to enter the mailbox of the user we are attempting to dredge messages from. Retain queries Exchange for messages that meet the criteria set in the job.

  6. Exchange then serves the oldest message that meets the criteria back to the Retain Worker through EWS on the CAS.

  7. The Retain Worker receives the message and opens it to query the Retain Server if the message body or attachments already exists.

    1. If the Retain Server determines that the message is new, then the body and attachments are stored in the archive, the header information and hash is saved in the database with links to the archive and the contents of the message are indexed.

    2. If the message already exists, the database is updated with the header data and linked to the existing data, and the existing message body or attachment is dropped by the worker and the next message is retrieved from the email system.

Troubleshooting Exchange Performance

In general, we have found that acceptable throughput is in the 3-5 messages per second range. In well designed systems with sufficient hardware resources we have seen throughput above 10 m/s. There is definitely an issue if the throughput is less than 3, and we have seen instances of less than 0.1. The first place to look is the worker log.

Shared Mailboxes, Rooms and Equipment

Impersonation rights allow the Retain user to enter other mailboxes but those rights do not extend to shared mailboxes. To access a shared mailbox the Retain user would need delegate rights to each shared mailbox that is to be archived. These rights can be granted through the Exchange Management Shell.

If the shared mailbox is owned by “John Doe” and your Retain impersonation account is "Retain", you would issue the following command in an Exchange Management Shell (EMC):

Add-MailboxPermission -Identity "John Doe" -User Retain -AccessRights FullAccess -InheritanceType All -AutoMapping $false

Mailbox Delays

We are looking for how long it takes Retain to log into each mailbox and when it finds the endpoint which tells us it entered the mailbox.

Search the log for lines containing:

enterMailbox
Discovered endpoint

Now you want to compare the difference in times between these two lines. It should be less than 2 seconds. If it is significantly longer than 2 seconds it is most likely an issue with the DNS not properly serving autodiscover.

2015-09-25 12:00:07,256 TRACE [RTWQuartzScheduler_Archive_Worker-1] com.gwava.caapi.MailboxArchivingStats: enterMailbox: JDoe@RETAIN.GWAVAUTAH
2015-09-25 12:02:14,177 DEBUG [RTWQuartzScheduler_Archive_Worker-1] com.gwava.ews.archiveimpl.process.ExchangeUser: Discovered endpoint: https://ad.test.sys/ews/exchange.asmxscreen

This indicates that there is an issue with how autodiscover is configured in the DNS. It may need an SCP or SRV record.

Message Delays

Another thing to search for are connection failures and retries, which increase each time it fails which can add up to 4 minutes:

search for items

Software caused connection abort: recv failed

EWS request failed: null. Will retry after

2015-07-22 00:25:25,056 TRACE [Thread-1341102] com.gwava.ews.RetainExchangeWebserviceFactory: retry, exception :
javax.xml.ws.WebServiceException: java.net.SocketException: Software caused connection abort: recv failed
at com.sun.xml.ws.transport.http.client.HttpClientTransport.readResponseCodeAndMessage(Unknown Source)
...
at com.gwava.ews.archiveimpl.process.CursorFetchThread.run(CursorFetchThread.java:1334)
Caused by: java.net.SocketException: Software caused connection abort: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
...
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:318)
... 27 more
2015-07-22 00:25:25,056 DEBUG [Thread-1341102] com.gwava.ews.RetainExchangeWebserviceFactory: EWS request failed: null. Will retry after 2 seconds

This will retry a few times with longer delays untl it aborts. Here we are losing connection to the Exchange server while already in a mailbox. This can indicate that there are issues with either a message attachment or the webserver on the Exchange or CAS servers is unable to serve the item at this time. Go to the message in Outlook or OWA and see if it can be accessed.

If the message can be accessed successfully export it as a .pst and use the PST Importer to bring it into Retain.

If the message cannot be accessed successfully then it will have to be deleted.

Exchange Health

You may also want to check the health of the Exchange server itself.

Performance Monitor

The first thing to check is the performance of the server by going into Performance Monitor to see it is above 80% utilization of CPU, Memory, Disk and/or Network. If they are consistently high you will want to use the various Server health, monitoring, and performance cmdlets to pinpoint the issue

Queues

Another thing to check are the Queues. The mail queues are how Exchange handles mail. You can see they by going into Exchange Tookbox/Queue Viewer. The number of messages in the queues should be low, if there is a queue with hundred or thousands of messages and they are not being cleared then that queue may have a stuck message, which would need to be cleared.

You can also use the Exchange Managment Shell (EMS) to check the status of the queues.

Get-Queues

Mailboxes

Another thing to check are the mailboxes. Performance can degrade if a mailbox has too many messages (~100k). The number of messages is more important then the size of the messages. For large systems you should pipe to a file since this command can exceed the EMS buffer.

Get-Mailbox | Get-MailboxStatistics > c:\mailboxstat.txt

If there is a specific mailbox with issues you may need to repair the mailbox.

Server Health

You can get a quick overview of an Exchange server's health by running this EMS cmdlet:

Get-ServerHealth -Identity server1 | Sort-Object AlertValue | ft Name, AlertValue

Exchange Throttling Policy and Bandwidth/Performance (2013)

Microsoft Exchange 2013 uses client throttling policies by default to track bandwidth for each Microsoft Exchange user and enforce bandwidth limits as necessary. Throttling policies should be turned off for the Retain Service Account, because they can affect the performance of Retain for Exchange when accessing mailboxes with a large number of folders and mail items.

  1. On a computer that hosts the Microsoft Exchange Management Shell, open the Microsoft Exchange Management Shell.

  2. Type these commands:

    1. New-ThrottlingPolicy [give it a policy name of your choosing]

    2. Set-ThrottlingPolicy [policy name from step "a"] -RCAMaxConcurrency Unlimited -EWSMaxConcurrency Unlimited -EWSMaxSubscriptions Unlimited -CPAMaxConcurrency Unlimited -EwsCutoffBalance Unlimited -EwsMaxBurst Unlimited -EwsRechargeRate Unlimited

    3. Set-Mailbox [Retain impersonation user account] -ThrottlingPolicy [policy name from step "a"]

  3. To check the policy run the command: Get-ThrottlingPolicy -Identity [policy name from step "a"] | Format-List

5.4.24 Exchange Throttling Policy and Bandwidth/Performance (2010)

The error indicates that either you have a throttling policy applied or the Exchange server is busy. Microsoft Exchange 2010 uses client throttling policies by default to track bandwidth for each Microsoft Exchange user and enforce bandwidth limits as necessary. Throttling policies should be turned off for the Retain Service Account, because they can affect the performance of Retain for Exchange when accessing mailboxes with a large number of folders and mail items.

  1. On a computer that hosts the Microsoft Exchange Management Shell, open the Microsoft Exchange Management Shell. Find out the default Throttling Policy: Get-ThrottlingPolicy

  2. Type these commands:

    1. New-ThrottlingPolicy [give it a policy name of your choosing] -RCAMaxConcurrency $null -RCAPercentTimeInAD $null -RCAPercentTimeInCAS $null -RCAPercentTimeInMailboxRPC $null -EWSMaxConcurrency $null -EWSPercentTimeInAD $null -EWSPercentTimeInCAS $null -EWSPercentTimeInMailboxRPC $null -EWSMaxSubscriptions $null -EWSFastSearchTimeoutInSeconds $null -EWSFindCountLimit $null

    2. Set-Mailbox [Retain impersonation user account] -ThrottlingPolicy [policy name from step "a"]

  3. Check the Throttling Policy for the "retain" impersonation user: Get-ThrottlingPolicy -Identity [policy name from step "a"] | Format-List

5.4.25 Exchange Journaling Mailbox

Using Exchange Journaling Mailbox is not recommended, but there are some situations were it is an option.

According to a Microsoft technician, they recommend at least 1 journaling mailbox per mail server. Exchange can only effectively support mailboxes under 5 - 10G. Exchange will begin to suffer from performance issues when the Inbox begins to exceed 2500-5000 messages. http://blogs.technet.com/b/exchange/archive/2005/03/14/395229.aspx

This means that, once you enable a journaling mailbox, you should begin archiving its contents and using the Retain option to delete the items from the mailbox once archived. However, if there are delays in getting those journaling mailboxes archived, you should watch the size. If it gets to 5G, turn it off and re-route email to another journaling mailbox until you get all of them archived and emptied out.

  1. Set up a journal mailbox for each mailbox database.

  2. Journaling jobs should have their own Profile with the Scope set to "All messages (ignore date)" and Duplicate Check set to "Try to publish all message (SLOW)" to gather all messages from the beginning of the mailbox. This profile can be used for all journaling mailbox jobs.

  3. Under Job, "Enable Journaling" and "Delete archived items from journal" must be enabled (checked) so that the journaling mailbox is cleared during the job, and choose the journaling mailbox you want archived. Create a separate job for each journaling mailbox.

Important note: As Retain archives the journal mailbox it creates a list of messages to be deleted but will only send the delete request when it exits the mailbox. If the job fails before it exits then the messages won't be deleted. Limiting the scope of the job to allow Retain to finish the job successfully will ensure that the messages are deleted.

How to Transition from Journaling to Rolling In-Place Hold for Exchange Archiving

There are changes you will have to make in Exchange and Retain to make this transition go as smoothly as possible.

Mandatory Exchange Tasks:

  1. Enable Rolling In-Place Hold. You can test that the hold is properly enabled by going into Outlook or OWA and deleting an item, going into the recoverable items dialog and attempting to purge the item. It should end up in the Purges folder which the user cannot see but Retain can. So you will need to run an archive job against it to see it within Search Messages in Retain. In Exchange 2010 you would want to enable Single Item Recovery which allows you to set a rolling duration for holding deleted items.

    Get-Mailbox | Set-Mailbox -SingleItemRecoveryEnabled $true -RetainDeletedItemsFor 90

  2. Disable Journal Rule in Exchange. Once the rolling in-place hold is enabled, you can disable the journal rule in Exchange. https://technet.microsoft.com/en-us/library/bb124264%28v=exchg.141%29.aspx

Mandatory Retain Tasks:

  1. Keep the existing Retain journaling job and allow that to run until the journal mailbox is empty. If you are currently unable to archive your existing journal mailbox(es) because they have become too large for Exchange to manage, there are powershell scripts for transfering mail to another mailbox.

  2. Create New Profile. The primary option to enable is Profile/Miscellaneous/"Include user's recoverable items". With this option enabled Retain will dredge each users recoverable items folder and all items and folders inside it, except the logs found in the Audits subfolder.

  3. Create a New Job(s) If you have multiple Exchange databases we recommend one job per mailbox database and one worker per job so they can run in parallel. (Retain Technical Support has a PowerShell 4.0 script to make this easier)

5.4.26 Large Attachments and/or Messages Cannot Be Archived

Symptoms you may notice when experiencing problems with default IIS limitations:

  • Retention is turned on in GroupWise and messages up to a certain date can't be deleted.

  • Errors on retrieving attachments show in the Worker log.

  • Can see messages that don't have all the attachments in Retain.

  • You may also have difficulty getting larger exports through the web interface (exports larger than 28.6 MB).

  • When logging is set to diagnostic for the Worker you can see errors like this:

15:15:15,668 RetainServerCommunication - Attempt to connect, but Server returned HTTP status (404): Not found (this line is typically repeated several times over the course of 5 minutes) 15:15:15,668 RetainServerCommunication - Giving up...too many retries! 15:15:15,668 ArchiveAttachment - Send a nice healthy blob:Archive: ERROR: Fatal Error Result=AddedEMails: 0, emailID=null, parentID=null 15:15:15,691 JobUtilities - HandleArchivingException

*Note: IIS is not supported by GWAVA. These are suggested methods for allowing Retain to archive large emails through IIS. For further information visit the MicroSoft support pages: http://www.iis.net/configreference/system.webserver/security/requestfiltering/requestlimits Some other useful information can also be found on the IIS forums: http://forums.iis.net/t/1066272.aspx

This may not be as much of an issue in Retain installations that were created with 3.x and newer. The RetainWorker will now communicate, by default, directly to the RetainServer on port 48080 thereby bypassing IIS. If you'd like to change this for an older installation, change the connection address of the worker. See the manual (look up "Worker Configuration") for your particular installation for more information. You may still have this be an issue on your Exchange server when Retain tries to collect from it if there are message attachments or messages that are larger than whatever ISS is set to allow through. This would be a setting on the Exchange side that would need to be changed. Default is 30000000 bytes.

For getting exports out of Retain you can also choose to bypass IIS and use http://(RetainIP):48080/RetainServer. IIS integration is more of a convenience to point users at Retain so that you don't have to deal with port information in a URL and other advantages that this can provide.

IIS, by default, limits the amount of data that can be imported by Retain. You can remove, or at least mitigate, this limitation by changing 4 settings. This example will be assuming you'd like to archive files up to 931 MB.

  1. 1. You'll need to increase the limit on how much data the RetainWorker and RetainServer can push/pull through IIS. You can do that using the following command*:

    1. ** %windir%\system32\inetsrv\appcmd set config "Default Web Site/RetainWorker" -section:requestFiltering -requestLimits.maxAllowedContentLength:1000000000

    2. %windir%\system32\inetsrv\appcmd set config "Default Web Site/RetainServer" -section:requestFiltering -requestLimits.maxAllowedContentLength:1000000000

    3. Current testing indicates that you'll also have to do a blanket statement: %windir%\system32\inetsrv\appcmd set config -section:requestFiltering -requestLimits.maxAllowedContentLength:1000000000

      *Note: the number at the end of the command is the size you'd like to have as the max in bites.

      **Note: the "Default Web Site/RetainWorker" piece may vary depending on your server setup. See the picture in the next section.

  2. 2. If you don't like command line you can also change it through the IIS manager.

    1. Bring up the IIS manager and highlight "Default Web Site"

    2. Double click on "Configuration Editor" as shown in the figure above.

    3. Use the "Section" area drop down box to go to "requestFilterg" as shown in the following figure.

    4. Expand the "requestLimits" section. Change the "maxAllowedContentLength" shown in the next figure to the size (in bytes) you would like to be able to pass though.

    5. Repeat for both RetainServer and RetainWorker.

  3. 3. You may also need to change the timeouts in IIS. To do this:

    1. Open the IIS manager.

    2. Highlight "Default Web Site".

    3. Click on "Limits"

    4. Change "Connection time-out (in seconds):" to the desired time.

5.4.27 Moving Users to a New Exchange Domain

If you need to move your users to a new Exchange domain without changing their email addresses (for example from user@organization.local to user@organization.org) you will need to use the moveMailboxes tool to keep the users associated with their existing archive, otherwise a new archive will be created for all users.

Prerequisites

  1. The new on-premise Exchange system can not have been archived by Retain before.

  2. The users continue to use the same email address, though the UPN may be different.

Procedure

  1. In the Retain Web Console, go to the Exchange module and select configure.

  2. Under the Impersonation tab, enter the new impersonation user credentials.

  3. Under the Exchange Forest tab, reconfigure the settings to the new Exchange system.

  4. Click the Test Connection button to confirm the connection can be made.

  5. Save your changes.

  6. Return to the Module Configuration page and Refresh the Address Book by clicking the Refresh Address Book button. Wait for the refresh to complete.

  7. Open the RetainServer log and tail the log to watch progress of the tool. On Windows a utility program like baretail is useful for this.

  8. Open a new tab and enter the URL: http://<your Retain Server Address>/RetainServer/Util/moveMailboxes.jsp. The page will be blank.

  9. In the RetainServer log when the migration is complete, you will see the message "MoveMailboxes: mailboxes moved: [amount of mailboxes]. Process Complete."

  10. Re-index all messages. In the Retain Web Console, go to Server Configuration | Index and press the Re-index All Messages button. This may take significant time in larger systems and search will be limited as the re-index is going on.

  11. Once re-indexing is complete, archiving can resume normally.

When the users log into Retain they will see two folders one with the mails from the original Exchange system and the other with mail from the new system. They have different system IDs so cannot be combined seamlessly

5.4.28 Concurrent Connection Limits

If jobs fail with the error: 421 4.3.2 The maximum number of concurrent connections has exceeded a limit, closing transmission channel.

It may be because we are hitting the maximum inbound connections per source limit connecting to Exchange. You will need to increase the MaxInboundConnectionPerSource parameter. See “Understanding message rate limits and throttling” for details.