# Configure IMAP Server Settings for Exchange or Office 365

The IMAP protocol is the default adapter type for NuPoint Unified Messaging. Use the IMAP4 protocol to connect the Microsoft Exchange and the NuPoint Unified Messaging server when you have less than 1500 Advanced UM users or Office 365 email server and the NuPoint Unified Messaging server when you have less than 750 Advanced UM users.

Instructions are provided on this page to set up IMAP for:

- MS Exchange Server

- MS Office 365

Notes:

- If you need to change your current authentication configuration from "Encrypted" to "Basic authentication" (password sent in clear text), or vice versa, then you must stop and restart the IMAP service for the change to take effect.

- If you need to change your current authentication configuration, then you must stop and restart the IMAP service for the change to take effect.

- For IMAP configurations of Microsoft servers, the Active Directory mail nickname attribute must be the same as the user logon name attribute.

- For Advanced UM with IMAP integration, no superuser account is required; however, NP-UM requires one account in Active Directory to query the Advanced UM user list. It is necessary to query to find each user's email address info and display name to deliver the voice mail to email.

- If your enterprise is using a Microsoft Exchange 2013 server in secure IMAP mode, your Advanced UM users may experience a delay of up to ten minutes between the time they delete their voicemail messages in Outlook and the time the NuPoint database is updated. This occurs because of known synchronization issue with Exchange 2013 and is described in the Microsoft technical forums.

## Configuration Options

Advanced UM with IMAP can be configured in either of two ways, depending on whether you want users to access their mailboxes individually or using a superuser account:

- Individual User Access: With this setup, which is available for all server types, individual users must update their Advanced UM Email Passwords whenever they change their email client passwords. No superuser is required; however, NP-UM requires one account in Microsoft Active Directory.

- Superuser Access: With this setup, which is available for Exchange Server, a superuser account (NPUMAdmin) is used to access the individual user accounts and deliver the voice mail to email. This frees users from having to update their Advanced UM Email Passwords when they change their email client passwords.

Note: If the IMAP service (Microsoft Exchange IMAP4) is already started, then you must restart the service after performing the configuration steps below in order for IMAP to function correctly. To restart the IMAP service, from the Services Console, select Microsoft Exchange IMAP and right-click to restart.

## IMAP4 Setup for Exchange Server 2010, 2013 or 2016

The following procedure provides the basic steps. For additional information, refer to the Microsoft documentation at the links provided.

Note: If your enterprise is using a Microsoft Exchange Server 2013 in secure IMAP mode, your Advanced UM users may experience a delay of up to ten minutes between the time they delete their voicemail messages in OCP and the time the NuPoint database is updated. This occurs because of known synchronization issue with Exchange 2013 and is described in the Microsoft technical forums.

1. Enable IMAP4 service on MS Exchange Server with Exchange Management Shell by entering the following commands:

Set-service msExchangeIMAP4 -startuptype automatic

Start-service msExchangeIMAP4

See the following link for more details: http://technet.microsoft.com/en-us/library/bb124489(EXCHG.80).aspx

2. Enable IMAP4 access for a user with Exchange Management Shell:

Set-CASMailbox -Identity CAS01 -ImapEnabled $true

1. Note: The value "CAS01" in the command line above is only an example. You need to enter a valid exchange account that is specific to your system.

See the following link for more details: http://technet.microsoft.com/en-us/library/bb124783(EXCHG.80).aspx

3. Configure authentication for IMAP4 with Exchange Management Shell by entering one of the following commands:

Set-ImapSettings –LoginType SecureLogin (Secure IMAP enabled; encryption occurs before authentication)

Set-ImapSettings –LoginType PlainTextAuthentication (Secure IMAP enabled; encryption occurs after authentication)

Set-ImapSettings -LoginType PlainTextLogin (Secure IMAP disabled)

See the following link for more details: http://technet.microsoft.com/en-us/library/aa997188(EXCHG.80).aspx

4. Through Administrative tools > Services, right-click Microsoft Exchange IMAP4 and select Restart (or "Start" if the service is not running.)

5. If you are using a Microsoft Exchange Server 2013, start the IMAP4 service and the IMAP4 Backend service. (These services are disabled by default on Exchange 2013.)

6. Proceed to the next step in the Configuring Advanced UM - Task List (Configure Advanced UM Parameters).

## IMAP Setup for Office 365

If your enterprise is employing Microsoft Office 365 as its hosted mail server, you can use to the following summary instructions to configure NuPoint UM and confirm that the connection between the systems is operational.

### Configuring the Connection to Office 365

To configure the connection to the Office 365 mail server:

1. From the Web View navigation tree, click Unified Messaging, and then click Advanced UM.

2. Select the Mail Servers tab and program the following:

3. Select Office 365 for the Mail Server Type.

4. Enter outlook.office365.com for the IP Address.

3. To check connectivity with the Office 365 server, click the Verify Mail Server IP Address button.

Note: For details concerning the mail server settings, see Configure Advanced UM Parameters.

### Configuring Advanced UM Users

To configure an Advanced UM user mailbox:

1. From the navigation tree, click Mailbox Maintenance, and then click Mailboxes.

2. Search for a specific mailbox or click Show All to see a complete list of mailboxes.

3. Click a mailbox link or select a mailbox in the list, and then click Edit > Selected.

4. Edit the mailbox parameters as required:

- Enter the email address (Microsoft) in the Advanced UM Email Alias field.

- Enter the password for the email alias in the Advanced UM Email Password field.

5. Click Save.

Note: For details concerning the Advanced UM user mailbox settings, see Enable Advanced UM for User Mailbox.

### Configuring Office 365

No special configuration steps are required to support Office 365 IMAP connection to NuPoint UM or Advanced UM user mailboxes. Refer to the Microsoft documentation for more information.

## NuPoint Advanced UM IMAP Configuration Settings on Exchange 2013 and Exchange 2016 Servers

The following steps provide basic information on how to configure IMAP settings on Exchange 2013, and 2016 servers for NuPoint Advanced Unified Messaging

Note: For any assistance with making changes to the Exchange server, the site administrator can contact Microsoft. The administrator is responsible for all configuration changes made to the server.

1. Create the following registry keys in your machine using the following procedure:

   1. Click Start, click Run, type regedit in the Open box, and then click OK. The Registry Editor window opens.

   2. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\ParametersSystem.

   3. Right-click the Parameters System key. A pop-up menu opens.

   4. Point to New and choose Key from the drop-down menu. A new key value displays as New Key #1. Rename it as Maximum Allowed Sessions Per User by right-clicking it and choosing Rename.

   5. Double-click Default on the right pane and enter the value 2048 in the Value Data field.

   6. Similarly add another registry key with the name Maximum Allowed Service Sessions Per User and value 2048.

2. Create the following DWORDs in the registry key using the following procedure:

   1. Right-click the Maximum Allowed Sessions Per User key. A pop-up menu opens.

   2. Point to New and choose DWORD Value from the drop-down menu. A new DWORD value displays as NewValue#1. Rename it as Maximum Allowed Sessions Per User by right-clicking it and choosing Rename.

   3. Double-click Maximum Allowed Sessions Per User. Click the Hexadecimal radio button in the Base section. Enter the value 2048 in the Value data text field and click OK.

   4. Similarly add another DWORD with the name Maximum Allowed Service Sessions Per User and value 2048.

3. Close the Registry Editor window. Restart the Exchange server or restart the IMAP4 front-end and back-end services.

4. After the server restarts, launch the Exchange Management Shell and run the following command to prevent the Exchange Server from repeatedly prompting for authentication credentials and to restart your IMAP services on the Exchange Server:

Set-IMAPSettings -EnableGSSAPIAndNTLMAuth $false cmdlet

5. Enable IMAP logging and run the following command in the Exchange Management Shell to set the log file size allotment on server as 10MB:

Set-ImapSettings -Server <ServerName> -LogPerFileSizeQuota 10MB

6. Set the Maximum connections from a single user to 200000 from the default value of 16. Also make sure that all other connections are set to the default values. To make these changes, access the Exchange Admin Center (EAC) in the Exchange Server and follow the below mentioned steps:

   1. In the EAC, navigate to Servers > Servers.

   2. In the list of servers, select the Client Access server, and then click Edit.

   3. On the Server Properties page, click IMAP4.

   4. Scroll down and click More options.

   5. Under Connection limits, specify the following settings:

      1. Maximum connections: Specifies the total number of connections the specified server will accept. This includes authenticated and unauthenticated connections. The default value is 2,147,483,647. The supported values are from 1 through 2,147,483,647.

      2. Maximum connections from a single IP address: Specifies the number of connections that the server will accept from a single IP address. The default value is 2,147,483,647. The supported values are from 1 through 2,147,483,647.

      3. Maximum connections from a single user: Specifies the maximum number of connections that the server will accept from a user. The default value is 16. The supported values are from 1 through 2,147,483,647. Make sure that you set the value to 200000.

      4. Maximum command size (bytes): Specifies the maximum size of a single command. The default value is 10,240. The supported values are from 1,024 through 16,384.

      5. Click Apply, and then click OK to save your changes.

You can also set the connection limits by running the following command in the Exchange Management Shell:

Set-ImapSettings -Server "exchange server name" -MaxConnectionsPerUser 200000

After you set the connection limits, restart the IMAP4 front-end and back-end services on the Exchange Server.

7. Configure the Throttling policy for ImapMaxConcurrency, ImapMaxBurst, ImapRechargeRate, ImapCutoffBalance, and CPAMaxConcurrency to Unlimited by running the following command in the Exchange Management Shell:

Set-ThrottlingPolicy NPUMAdminPolicy -ImapMaxConcurrency Unlimited -ImapMaxBurst Unlimited -ImapRechargeRate Unlimited -ImapCutoffBalance Unlimited -CPAMaxConcurrency Unlimited