How to do basic IMAP setup / troubleshooting in Exchange 2013

exchange-2013imapwindows-server-2012-r2

So I've had an Exchange Server (v2013 with cu21) running on a Windows Server 2012 R2 box for several years now, without many problems.

We almost exclusively use Outlook-Exchange integration and active sync.

Recently, I have a need to use IMAP on a particular client, but it doesn't seem to work. I thought I've had IMAP enabled since the original install, and everything I check seems to support that, yet I simply can't connect using IMAP.

Things I've tried:

  1. IMAP4 service and IMAP4 Backend service are both running, automatically. I tried restarting both services.
  2. Connecting via a local LAN, so external firewall shouldn't be an issue.
  3. Verifying ports 143 and 993 are open. They are. Tried disabling the Windows firewall just for good measure. Nothing.
  4. I'm using a wildcard SSL certificate works fine for other purposes. I used Get-IMAPSettings to check that the certificate was properly defined, and I used Set-IMAPSettings -X509CertificateName to set it again just to be sure.
  5. I've checked Get-ServerHealth to make sure all IMAP-related processes are Healthy.
  6. I downloaded a script called HealthChecker.ps1 and ran that just for good measure.
  7. Test-IMAPConnectivity fails with the very helpful status of Failure
  8. I can telnet to 578 (smtp) from another machine on the LAN, but when I telnet to 143 or 993, I get a black terminal (like the entire terminal window resets) and then after about 5 seconds it sends me back to the command prompt, with no messages.
  9. I tried Set-ImapSettings -ProtocolLogEnabled $true, but my login attempts don't even appear in the log. The only user I see accessing IMAP in the logs is the Health mailbox.
  10. Tried Set-IMAPSettins -ExternalConnectionSetting just for fun
  11. Verified that IMAP is enabled in ECP for the user that I'm using to test

What could I be missing here?

Best Answer

According to this blog and this MS tech note, this can happen when the corresponding back end component, ImapProxy, is in inactive state.

Use the Get-ServerComponentState <ServerName> command to check on the status of components.

Next, try to reactivate the ImapProxy component:

Set-ServerComponentState -Identity <exchange-servername> -Component IMAPProxy -State Active -Requester HealthAPI 

Run the Get-ServerComponentState command again to check if things have improved.