Microsoft Exchange
When working with MS Exchange, MailArchiva requires two separate connections:
- An SMTP listener. Receives email journaling traffic from MS Exchange on port 25
- An Exchange client connection. Synchronizes folders, calendars and contacts from MS Exchange (this connection is not used to receive live email journaling traffic)
The basic configuration steps are as follows:
- Setup Active Directory (AD) Authentication
- Configure an Exchange Impersonation account
- Create an Exchange client connection in MailArchiva
- Configure MailArchiva to listen on port 25 for MS Exchange traffic
- Setup Exchange journaling using the SMTP protocol
- Import historical data from MS Exchange
MailArchiva SMTP Listener
- In the MailArchiva Console, Click Configuration->Listeners.
- Select SMTP Listener in the drop down and then click the New Listener button.
- Check "Listen for incoming Exchange/SMTP requests"
- Set the SMTP port as 25
- Click Save
Exchange 2013/2016/2019 SMTP Journaling Setup
Setup Journaling
- Login to the Exchange Control Panel by opening the browser at https://[exchange ipaddress]/ecp
- From the Exchange Admin Center
- Click compliance management in left menu
- Click journal rules in top right menu
- Click the + icon
- Enter journal in the name field
- In the field that says "If the message is sent to or received from...", select "Apply to all messages".
- In the field that says "journal the following messages..", select "All messages"
- In Send journal reports to field, enter [value of journal recipient field in MailArchiva Web Console->System Status]@[fully qualified domain name of your mailarchiva server]. For example: journal-000000T0R2KQuOyRvlZ18qxiAekc6RRHkQb4i0GjkJ3t4Ns150SfrknkuLMbGAr@mailarchiva.company.com)
Note: Your instinct will be to enter an email address above. This is wrong! The domain suffix must be the fully qualified domain name (FQDN) of the MailArchiva server (NOT AN EMAIL ADDRESS!) - Click Save to change changes
- Accept "Do you want this rule to apply to all future messages"
- Select Mail Flow and then Send Connectors
- Click + to add a new send connector
- Enter 'Mailarchiva' in the Name field.
- Select Custom for the Type option
- Click Next
- Under Network settings, select Route mail to smart host
- Click + to add a new smart host
- Enter the fully qualified domain name of the MailArchiva server (e.g. mailarchiva.company.com). Click Save
- The new host should be listed under Smart Host in the New Send Connector Window. Click Next
- Select None for the Smart host authentication option. Click Next.
Note: For enhanced security, consider enabling connection security and certificate authentication. - Click + to add a new address space. Enter the fully qualified domain name (FQDN) of the Mailarchiva Server. Click Next.
-
Click + to select. In the popup dialog select the source Exchange server, then click Add. Click OK.
-
Click Finish.
Adjust Maximum Message Size
By default, the maximum send message size for the Connector is set to 10 MB. This is far too low for most journaling applications
To change this:
- Open the Exchange Management Shell
- Enter the following command to the set maximum send message size: Set-SendConnector "MailArchiva Connector" -MaxMessageSize "200 MB"
- Enter the following command to verify the maximum send message size is 200 MB: Get-SendConnector "MailArchiva Connector" |fl MaxMessageSize
Disable Non Delivery Reports (optional)
- Open the Exchange Management Shell.
- Enter the following command to disable NDRs
- Set-RemoteDomain <Domain> -NDREnabled $false (replace <Domain> with the FQDN of the MailArchiva server [e.g. mailarchiva.company.com]
Exchange 2010 SMTP Journaling Setup
Create Mail Contact
- Click Start > All Programs > Microsoft Exchange Server 2010 > Exchange Management Console
- Select the Microsoft Exchange On-Premises instance
- Select Recipient Configuration
- Below the Recipient Configuration, select Mail Contact
- In the Action pane to the right, select New Mail Contact
- In the create mail contact dialog that appears, select New Contact
- Enter "journal" for the new contact name and fill out the rest of the required information.
- Select Edit aside the new contact's external e-mail address
- A dialog appears prompting for an external email address. Enter the equivalent of "archive@mailarchiva.company.com"
- After entering the address, click OK. After returning back to the new contact dialog, select Next
- Select new to create the New Mail Contact
- After clicking New, the New Mail Contact will be created.
- Click Finish to return to the Exchange Management Console.
Enable Standard Journaling
- Click Organization Configuration, thereafter Mailbox
- In the Database Management tab to the right, select the database for which journaling must be enabled.
- Right click on the database and select properties
- A new window appears. Select the maintenance tab and then select Browse
- Click the Journal Recipient and then browse to the New Mail Contact created previously
- Click OK
Create a Send Connector
- Open the Send Connector tab under Server Management->Hub Transport option
- Right-click in the empty space and select new Send Connector
- Ensure intended use field is set to custom.
- Enter the MailArchiva in Name field, then click “Next."
- Click “Add” in the address space window
- In the address field, enter the fully qualified domain name of the MailArchiva server (e.g. mailarchiva.company.com)
- Select "Route mail through the following smart hosts". Click Add..
-
Select IP Address. Enter the IP address of the MailArchiva server. Click OK, then Next.
-
Leave smart host authentication settings as None. Click Next.
-
Choose the Hub Transport Server's that apply. Click Next.
- Preview Configuration Summary. Click New.
Exchange 2007 SMTP Journaling Setup
- Start the Microsoft Exchange Console
- Expand Recipient Configuration, then select Mail Contact.
-
Open Mail Contact item
-
In right actions pane, click New Mail Contact
-
In Name field, Enter mailarchiva
-
In Email Address Field, enter [value of journal recipient field in MailArchiva Web Console->System Status]@[fully qualified domain name of your mailarchiva server]. For example: journal-000000T0R2KQuOyRvlZ18qxiAekc6RRHkQb4i0GjkJ3t4Ns150SfrknkuLMbGAr@mailarchiva.company.com)
Note: Your instinct will be to enter an email address above. This is wrong! The domain suffix must be the fully qualified domain name (FQDN) of the MailArchiva server (NOT AN EMAIL ADDRESS!) - Click Ok
Configure Message Format Settings
- Open your Exchange Management Console.
- Expand Recipient Configuration, then select Mail Contact.
- In the result pane, select the Mail contact.
- In the action pane, under the Mail contact, click Properties.
- On the General tab, from the Use MAPI rich text format list, select Never.
With this setting, journal reports are sent in MIME rather than S/TNEF.
Create Send Connector
- Open the Exchange Management Console
- Expand Organization->Hub Transport
- Select Send Connector tab
-
In Actions page, click New Send Connector
-
In Name field, enter MailArchiva. Click New
-
Click Add in Address Space
-
Enter fully qualified domain name (FQDN) of MailArchiva server (e.g. mailarchiva.company.com)
-
Leave "include all subdomains" unchecked. Click OK, then Next
-
Select "Route mail through the following smart hosts". Click Add..
-
Select IP Address radio button. Enter the IP address of the MailArchiva server. Click OK, then Next
-
Leave smart host authentication settings as None. Click Next
-
Choose the hub transport servers that apply (as necessary). Click Next
-
Preview Configuration Summary. Click New.
Enable Standard Journaling
- Open the Exchange Management Console
- Expand Organization->Hub Transport
- Click New Journal Rule
-
Enter "mailarchiva" for the Rule Name
-
Next to "send journal reports to email address:", click Browse and select "mailarchiva" Mail Contact created earlier
-
Ensure Scope is set to Global
-
Check Enable Rule
-
Click New
If no emails arrive, please follow the Archiving Stopped troubleshooting steps.
Exchange 2003 SMTP Journaling Setup
Create Mail Contact
- Open the Active Directory Users and Computers by selecting Start > All Programs > Administrative Tools.
- Right click Users and select New, then select Contact.
- In the New Object - Contact window, type "MailArchiva" in the First name field, "Archive" in the Last name field. Click Next.
- Select Create an Exchange email address checkbox. Click Modify.
- Select SMTP Address in the New E-mail Address window and then click OK.
- In the E-mail address field on the General tab of the Internet Address Properties window, enter the equivalent of mailarchiva@[FQDN of MailArchiva server]) (for example, mailarchiva@mailarchiva.company.com)
- In the Internet Address Properties window, click the Advanced tab
- Check the box for Override Internet Mail settings for this recipient.
- Under Message Format: check the radio button for MIME.
- Under Message Body: check the radio button for Plain Text, and then click OK.
- The Internet Address Properties window closes. Click Next.
- Click Finish.
Create SMTP Connector
-
Open the Exchange System Manager window by selecting Start -> Programs -> Microsoft Exchange -> System Manager.
-
In the left-hand menu, right-click Connectors.
-
Select New and then select SMTP Connector.
-
In the Properties window, type "MailArchiva Archive" in the Name field.
-
Select Forward all mail through this connector to the following smart hosts. Type the IP Address of the MailArchiva server into the resultant field.
- Within the Local Bridgeheads section, click Add. The Add Bridgehead dialog box displays. Select the server in which you would like to name the bridgehead. Click OK to close the dialog box.
-
In the Properties window, click the Address Space tab. Click Add.
-
Select SMTP in the resulting Add Address Space dialog box. Click OK.
- In the Email Domain field of the Internet Address Space Properties dialog, enter fully qualified domain name (FQDN) of MailArchiva server (e.g. mailarchiva.company.com). Type 1 in the Cost field. Click OK to close the dialog box.
- The FQDN of the MailArchiva server is displayed in the Properties window. Only this item should be selected in the Address Space field.
-
In the Properties window, click the Advanced tab. Click Outbound Security
-
Make sure TLS encryption checkbox is unchecked, in the resulting Outbound Security dialog box. Click OK to close the dialog box.
-
Click OK to close the Properties window.
Activate Journaling
- Open the Exchange System Manager window by selecting Start -> Programs -> Microsoft Exchange ->System Manager
- In the left navigation menu, select Servers, select your server name. Thereafter, select the Storage Group that contains the mailboxes to which journaling should be applied.
- In the right-hand content frame, right-click the Mailbox Store you wish to apply journaling, from within the list. Select Properties in the drop-down menu.
-
In the Mailbox Store Properties window, select the Archive all messages sent or received by mailboxes on this store checkbox
-
In Select Recipient dialog box, type the name of the Journaling Mail Contact created earlier. Click OK.
-
The Journaling Mail Contact appears within the Mailbox Store Properties window. Click OK to close the window
- Open the Exchange System Manager window by selecting Start -> Programs - > Microsoft Exchange -> System Manager
- Expand the Global Settings folder in the left navigation menu. Right-click Internet Message Formats. Select New and then select Domain.
- In the General tab of the Properties window, enter the fully qualified domain name of the MailArchiva server (e.g. mailarchiva.company.com)
- In the Message Format tab of the Properties window, select the MIME and "Provide message body as plain text" radio buttons.
- In the Advanced tab of the Properties window, select "Never use" within the Exchange rich-text format section.
- Deselect the Allow non-delivery reports checkbox
IMAP Journaling
The IMAP Journaling approach involves retrieve journal traffic from MS Exchange using the IMAP protocol. This requires two steps:
- Configure MS Exchange - Create a journal mailbox and configure MS Exchange to send journaling traffic to it
- Configure MailArchiva - Create an IMAP connection in MailArchiva for the purposes of retrieving emails from MS Exchange
If running MS Exchange in a Clustered Environment, refer to Additional Cluster Environment Steps.
Exchange 2007 / 2010 IMAP Journaling Configuration
- Create a Journal Account
On the server running Microsoft Exchange, open the Active Directory Users and Computers console, right-click on the Users container and choose New -> Contact from the menus. When prompted, enter the first name, last name, full name and display name of the contact you're creating and click OK.
- Enable Journaling Agent
Go to the Hub Transport server, open the Exchange Management Shell, and execute the following command:
Get-TransportAgent |
The Get-TransportAgent command will return a status of either True or False, indicating whether or not the journaling agent is enabled.
If the journaling agent's enabled status is False, then you will have to enable the journaling agent before continuing. To do so, enter the following command:
Enable-transportagent |
The command prompts you to enter additional information.
To enable the journaling agent, enter the words "Journaling Agent."
The Exchange Management Shell doesn't provide any confirmation that the journaling agent has been enabled. Enter the Get-TransportAgent command once again to confirm that the journaling agent has been activated.
- Create a Journaling Rule
The process of creating an Exchange 2007/2010 journaling rule is fairly simple:
a) Open the Exchange Management Console and navigate through the console tree to Organization Configuration -> Hub Transport.
b) Select the Journaling tab, and then click the New Journal Rule link found in the Actions pane to open the New Journal Rule wizard. Enter a descriptive name for the Exchange 2007 journaling rule that you are creating.
c) Just beneath the Rule Name field is the Send Journal Reports to E-Mail Addresses field. This is where you supply the name of the journal mailbox.
d) In the scope field, select all messages.
e) In the next field, specify the journal mailbox as the recipient.
f) Finally, the wizard contains a checkbox that you can use to enable the rule upon creation. This is checked by default, unless you choose to deselect it prior to creating the journaling rule.
g) After filling in the wizard's various parameters, click the New button and the Exchange 2007 journaling rule will be created.
- Configure Exchange IMAP Server Settings
Configure the Microsoft Exchange IMAP server to accept plaintext authentication. In Exchange 2007, the IMAP server settings are accessible from the Exchange Management Console in Server Configuration > Client Access > IMAP4 > Properties -> Authenticaton tab.
MailArchiva expects the journal envelopes it receives to be in plaintext. Care should be taken to ensure that Microsoft Exchange’s IMAP server will not convert the journal messages to TNEF, rich text or HTML. In Exchange 2007, this option is accesible from the Exchange Management Console in Server Configuration -> Client Access -> IMAP4 -> Properties -> Retrieval Settings tab. Select the Message MIME format to “Best Body Format”.
- Start the Exchange IMAP Service in Windows Services.
Click Start, type "services.msc" in the search box. Locate the IMAP service and start.
Exchange journaling configuration is complete. Proceed to Create Journal Connection in MailArchiva.
Microsoft Exchange 2003 IMAP Journaling Configuration
- On the server running Microsoft Exchange, using the Active Directory Users and Computers browser, create a Windows user account where all incoming and outgoing mail will be temporarily archived. This account must reside on your company’s domain (i.e. not a local machine account).
- On the same server, run the System Manager Application included with Microsoft Exchange. Locate the Mailbox Store node in the tree view on the left. It is in Servers->First Storage Group->Mailbox Database. Right click the Mailbox Database object and click Properties. A dialog will appear as in Figure 2. Click Browse and enter “journal” for the object name. Click OK. Journaling is now enabled for the Mailbox Store.
- If you are using Exchange 2000/2003
i) Install the latest Service Pack ii) Download the Exejcfg.exe utility from Microsoft’s Download Center
To enable envelope journaling, from command prompt, type:Exejcfg –e
-
Configure the Microsoft Exchange IMAP Server Settings
Ensure that the Microsoft Exchange IMAP server is configured to accept plaintext authentication. In addition, MailArchiva expects the journal envelopes it receives to be in plaintext. Care should be taken to ensure that Microsoft Exchange’s IMAP server will not convert the journal messages to TNEF, rich text or HTML.
- Start the Exchange IMAP Service in Windows Services.
Click Start, type "services.msc" in the search box. Locate the IMAP service and start.
Exchange journaling configuration is complete. Proceed to Create Journal Connection in MailArchiva.
MailArchiva Configuration - Create Journal Connection
MailArchiva must be configured to retrieve emails from the Exchange journal account created earlier.
Enable Journalling in MailArchiva:
- In Configuration->Connections, select IMAP Client and click New Connection
- Enter the server address of your Exchange server
- Enter the Microsoft Exchange journal account username and password
- For the connection Mode, select TLS when available (on some versions of MS Exchange you will need to select SSL)
- Ensure Auth Certs is unchecked.
- Disable IMAP Idle (some Exchange Server seem to stop delivering emails after a period when IMAP Idle is enabled)
- Click Save to save configuration.
- Click Test Connection to ensure that MailArchiva is able to establish a clean connection to Exchange's IMAP Server.
- If the test is successful, check the Enabled checkbox and Save the configuration.
- Click Status at the top menu. A chart should be displayed. When emails arrive, they will appear as moving bars in the chart.
- Verify that MailArchiva is receiving journal envelopes
Select Configuration->Search tab->Export Method->journal Message. Thereafter, in Search, export a message and view a text editor. The message should contain a journal envelope. There should be no HTML or special character codes in the journal envelope. If there are special characters, then TNEF or HTML conversion is not disabled as it should be.
If no emails arrive, please follow the Archiving Stopped troubleshooting steps.
Additional Steps for a Clustered Environment
If Exchange operates in a clustered environment, the IMAP resource will need to be added to the cluster.
- Open the ‘Cluster Admin’ console
- Click on the Exchange Resource Group
- Click File -> New -> Resource in the Menu.
- Enter a friendly name for the IMAP4 server
- Select "Microsoft Exchange IMAP4 Server" In the ‘Resource Type’ field
- Ensure that the Exchange Resource is in the ‘Resource Group’ field.
- Add the Nodes which you like to own the Resource, Click Next.
- Add the Exchange System Attendant dependency to the Resource. Click Next.
- Select the IMAP4 Instance as the Resource. Make the resource online.
- Configure MailArchiva to retrieve e-mails as above using the MS Exchange IP, not the cluster IP.
Found this information useful? Visit mailarchiva.com to learn more about MailArchiva.