# Install MAPI Gateway

Note: MAPI Gateway is not supported on Exchange 2016 onwards.

The Messaging Application Programming Interface (MAPI) email Gateway uses a proprietary Microsoft protocol to connect the Advanced UM components and the Microsoft Exchange Server. The MAPI email gateway is located on a separate Windows server.

### Limits and Conditions

The following limits and conditions apply:

- Install the MAPI gateway on a dedicated server; do not attempt to install it on the Exchange server or the NuPoint UM system.

- Multiple Exchange servers are supported; however, they must all be in the same domain and have the same software version. Do not attempt to connect the MAPI gateway to Exchange servers in multiple domains, or to Exchange servers that have different software versions.

- Multiple MAPI gateways are supported; you can enter IP addresses for up to six gateways on the NuPoint UM Advanced UM Configuration screen. On all of the gateways that you implement, you must point to one Client Access Server (CAS) or Exchange server.

- If a clustered environment has been implemented, the MAPI gateway receives the information it requires (user and server details) from the Exchange server.

- When you are installing the MAPI gateway, if you are presented with a message stating "The MAPI application needs to configure the following port: TCP Port: 143 MAPI. Do you wish to configure the port?" message, select YES. Selecting NO results in MAPI not functioning.

- Each user must have a unique Advanced UM Email Alias (i.e. the alias must not be used in any other NuPoint mailbox). Duplication of aliases causes NuPoint to attempt to synchronize two voice mailboxes to one email account, which may result in deletion of all voice messages.

- Office 365 cannot be configured to use a MAPI Gateway.

- The MAPI Gateway software can be installed on a computer with any of the following operating systems:

- - Windows 7 (32- and 64-bit)

  - Windows 8 and 8.1 (32- and 64-bit)

  - Windows 10 (64-bit)

  - Windows Server 2008 R2 (64-bit)

  - Windows Server 2012 R2 (64-bit)

If you attempt to install MAPI Gateway on a variant of one of the supported operating systems that is not recognized by the installer, the following warning will appear: "The <OS Version> is not in the supported list. Do you want to continue?" Answering "Yes" will allow the installation to proceed.

### Precondition

- On the Exchange server, create a Superuser account (NPUMAdmin) and assign permissions to it:

- - Create a Superuser Account for MS Exchange.

### Installation

To install the MAPI Gateway on a Windows server:

1. Log in as the administrator.

2. Install all available updates and patches and uninstall Microsoft Outlook (if it is installed).

3. Add the local machine to the Exchange server domain.

4. Add the Exchange Superuser to the local administrator group.

5. Log out as the administrator.

6. Log in as the Exchange Superuser and do the following:

- For Exchange Server 2010 and 2013, install "Microsoft Exchange Server MAPI Client and Collaboration Data Objects 1.2.1" available from the MS Download Center.

7. Insert NuPoint UM Software DVD1 into the server's CD/DVD drive. (This is the same DVD that you used to originally install NuPoint UM.)

8. Locate and then double-click the MAPI GW executable file (MAPIGatewayInstaller.exe). Click Next.

9. Accept the terms of the license agreement and then click Next.

10. Read the preconditions and then click Next.

11. Choose a destination location and then click Next.

12. Click Install.

13. If prompted to enable the firewall exception, click Yes.

14. Select the Launch NPM MAPI Gateway configurator check box and then click Finish.

15. Enter the following information:

- Exchange Server Domain: Enter the address (IP or domain name) of the Exchange Server to which the MAPI GW is connecting (for example, npi.mitel.com). Only one domain is supported. If a Client Access Server (CAS) is in use, enter the address of the Exchange Server or load balancer functioning as the CAS.

- Exchange Server Host: Enter the host name of the Exchange Server (for example, iexchange). (This must be the Exchange server where the Superuser account is configured.) If a Client Access Server (CAS) is in use, enter the address of the Exchange Server or load balancer functioning as the CAS.

- CAS: Select this check box if an Exchange Server or load balancer is functioning as a Client Access Server (CAS). When an Exchange Server is the CAS, it supports the Outlook Web App and Microsoft Exchange ActiveSync client applications, plus the POP3 and IMAP4 protocols.

- Superuser Account name: The account name with the Superuser (or "root") privileges on the Exchange server (NPUMAdmin).

- Superuser Password: The password of the Superuser Account.

- Exchange Server Version: The version of Microsoft Exchange you are running.

- Exchange GUID: (Exchange 2013 only) The mailbox globally unique identifier (GUID) of the Superuser account. To obtain this value, see Determining the Exchange GUID in Outlook (below).

- Convert NPM VMAIL from IMAP to MAPI: Select this check box to changes all IMAP voice messages to a known MAPI Gateway format. For more information on when to use this setting, see Conversion from IMAP to MAPI Gateway (below).

16. Click OK to display the Microsoft Exchange Server window.

17. In the Microsoft Exchange Server field:

- For Exchange Server 2010, enter the fully qualified domain name of the Exchange server to which the MAPI is connecting (for example, test.mitel.com).

- For Exchange Server 2013, enter the Exchange GUID determined in Outlook.

18. For Exchange 2013, change the following setting:

- Go to Menu > Internet Options > Connections > LAN Settings.

- Clear the Automatically Detect Settings option.

19. Click OK. The system installs MAPI Gateway.

20. Reboot the computer.

21. Restart the MAPI Gateway services. This causes the Superuser account to log in to the Exchange server, which assigns port 143 to the MAPI Gateway.

### Determining the Exchange GUID in Outlook

To determine the mailbox globally unique identifier (GUID) for Exchange:

1. Open MS Outlook.

2. While holding the CTRL button, click the Outlook icon in the system tray.

3. Select Test E-Mail Autoconfiguration.

4. In the Test Autoconfiguration window, enter the superuser's email address (for example, NPUMAdmin@<domain-name>).

5. Click Test.

6. Select the XML tab and copy the text in the <server>.......</server> tags.

7. Paste the text into the Exchange GUID field in the MAPI Gateway Configuration window. To program this value, see Installing the MAPI Gateway (above).

### Re-configuring the MAPI Gateway

If you need to change MAPI settings, you can reconfigure the MAPI Gateway:

1. Navigate to Program Files > Mitel > Mitel MAPI GW.

2. Double-click the MapiGWConfig.exe file.

Note: You can also access the MapiGWConfig.exe file from the desktop icon.

3. Reconfigure the settings as required and click OK.

4. Reboot the computer.

## Conversion from IMAP to MAPI Gateway

In the MAPI Gateway (GW) configuration, there is an option called Convert NPM VMAIL from IMAP to MAPI. This option can be used for switching Advanced Unified Messaging sites from IMAP to MAPI Gateway. Voice mail messages saved using IMAP do not contain the information that MAPI GW needs to perform a voice mail search in MS Exchange. The conversion procedure changes all IMAP voice messages to a known MAPI Gateway format. If the conversion is not done, the IMAP voice messages are treated as e-mail messages and are deleted.

When the Convert NPM VMAIL from IMAP to MAPI option is enabled, the MAPI GW loops through all the e-mail messages in each user's inbox on the MS Exchange server and finds the special signature of voice mail messages. When a voice mail signature is found, the procedure changes the signature of the message so it can be recognized as a voice mail by the MAPI Gateway. This process is time consuming and may require several hours if there are many users on the system.

It is important to enable this option when you are switching Advanced Unified Messaging from IMAP to MAPI GW. However, after Advanced UM with MAPI GW has run a specific amount of time (one day is recommended) and all users with the IMAP setting have migrated to the MAPI GW, then this option should be disabled to increase the speed of the MAPI GW.

New Advanced UM systems starting out on the MAPI Gateway should have this option disabled.

Note: If this option is left enabled, then the IMAP to MAPI GW conversion takes place every night when the MAPI GW is restarted. To avoid wasted time and processing power, this option should be disabled after the initial IMAP to MAPI GW migration.

## Installing the Virtual MAPI Gateway

Use the following procedure to deploy the MAPI Gateway as an appliance within a VMware ESXi virtualized environment. Depending on your operating system, the following requirements must be met:

Operating System | vCPU | Memory (GB) | Storage (GB)
Windows Server 2003 (32-bit) | 2 | 1 | 16
Windows Server 2008 (32-bit) and 2008 R2 (64-bit) | 2 | 2 | 32
Windows Server 2012 | 1 | 4 | 40
Windows 7 Professional (32- and 64-bit) | 2 | 2 | 25
Windows 8 Professional (64-bit) | 2 | 2 | 25

Note: For instructions to install and maintain Virtual NuPoint (vNuPoint) in a VMware environment, consult the NuPoint Unified Messaging Technician's Handbook.

To add the virtual appliance:

1. Launch the vSphere Client application on the network PC.

2. Click Start -> All Programs.

3. Click Vmware -> VMware vSphere Client.

4. Enter the IP address or hostname of the Hypervisor ESX/ESXi Host server
   or
   Enter the IP address or hostname of the vCenter Server.

5. Enter your username and password.

6. Click OK.

To install the virtual MAPI GW:

1. Insert NuPoint UM Software DVD 1 into the vSphere client CD/DVD drive.

2. Enable the connection to the virtual machine's CD/DVD drive:

- In the vSphere Client toolbar, click the CD icon.

- Click Connect to CD/DVD 1.

- Select Connect to D: (The drive letter may vary, depending on your client PC setup.)

3. In the vSphere Client, click the Console tab.

4. Initiate the installation:

- If AutoPlay is enabled, the software options dialog will display; click the MAPI GW button.

- If AutoPlay is disabled, locate and then double-click the MAPI GW executable file (MAPIGatewayInstaller) on DVD 1.

5. Complete the regular MAPI GW installation.