Tuesday, February 10, 2015

Issue with (and fix for) broken IMAP on Exchange 2013

Recently I ran into an issue configuring some new Exchange 2013 servers for IMAP4. I'll share my configuration, troubleshooting steps and the solution here in this article.

Enabled and started the IMAP4 and IMAP4BE services and created a virtual service on the load balancer listening on port 993. I've done this many times before and was quite surprised that the initial testing with Outlook in IMAP4 mode failed. From a testing perspective I prefer Outlook because it allows not only connecting, but also authentication and actually accessing a mailbox through IMAP4.

I proceeded with a telnet to the load balancer VIP on port 993 and got nothing more than a black screen. Not exactly sure what to expect on port 993 because the encryption I tested port 143 directly against the server, bypassing the load balancer. Here I expected the IMAP banner but saw again just an empty window.

image

Blank screen, hitting any key resulted in the PowerShell prompt gain. Telnet on the local server to localhost instead of the server name:

image

So a telnet to localhost results in the IMAP banner, all other options fail. Time to look under the hood and consult Managed Availability. Get-HealthReport reported the Health Set IMAP.Proxy in an offline state:

image

Setting the state back to active did the trick:

Set-ServerComponentState -Identity ex01 -Component ImapProxy -State Active -Requester HealthAPI

With all components in an active state I was able to connect with IMAP with both telnet and Outlook.

image

I have seen this issue on multiple servers now, happened to be all running CU7. On the other hand, some other servers did not have this issue. If you run into issues trying to get IMAP4 working on Exchange 2013, maybe the information above helps you to find the cause.

50 comments:

Patrick said...

Hi !

You saved my life with your tip !
Was becoming insane lol.

Thx a lot !!

Anonymous said...

You are the man. Had the same exact problem on CU7. Your commmand fixed it. Thank you thank you thank you.

Atomic Shrimp said...

Brilliant fix. Saved my skin. Thank you.

Lars K said...

Thanks for this fix! After a crashed Exchange 2013, I had this problem. It was also running CU7, and and upgrade to CU8 did not fix it. But your fix solved it!

Anonymous said...

Encountered this issue today on CU5 after performing a reboot of the server over the weekend, this was very helpful, thank you!

Jetze Mellema said...

You're welcome, Anonymous. Now proceed and update your server to a more recent CU. :)

Anonymous said...

Thank you! I'm on CU7 and your command fixed it. My DC was offline this morning which I think caused this, but I had never encountered this before. Your fix worked like a charm.

Anonymous said...

Also needed in Exchange 2016 Preview...

Anonymous said...

Thank you so much! I had this issue on Exchange 2013 sp1 cu9, after an imap4 service stop.
You saved my day.

JSF said...

Jetze, bedankt, ook voor ons was dit de oplossing om IMAP4 werkend te krijgen. groet uit Friesland

Anonymous said...

You have solved my issue after two days of suffering.
Thanks a lot............

Anonymous said...

Same issue Exchange 2013 sp1 cu9

Thumbs up!

Anonymous said...

Thank You!!!!!!!!!!!!

Anonymous said...

Thanks you very much!!

Anonymous said...

Jetze, thank you so much, a very helpful hint!

Anonymous said...

Thanks man !! after 3 hours of searching I found this article.
Immediately worked.

Anonymous said...

Hi,

We are facing issue with exchange 2013CU10 and SP1 with IMAP.

We are trying to configure the IMAP outlook profile but it was not configured.

Please help

Jetze Mellema said...

Not sure what you're asking. Please follow the steps in the article to validate if the server side is setup correctly and is working as expected. Then configuring the client should be a piece of cake.

Anonymous said...

WOOT! This really saved my bacon. I couldn't figure out why an imap request would sometimes work and sometimes fail.

Dmitry Kirushev said...

Thanks!

Dmitry Kirushev said...

Thanks! Cool solution. It's work!

Dmitry Kirushev said...

for Anonimous (Nov 8, 2015 at 3:21 PM) http://blogs.technet.com/b/mspfe/archive/2015/08/24/exchange-server-2013-cu9-watch-your-imap-clients.aspx

Anonymous said...

Thanks !

this help me to solve Imap service at my organization

Mostafa Assifar said...

After too days off fighting :
I restart the services throw services.msc many times ==> KO

TNX

Bertrand said...

Thank you! I had this problem on one server, but IMAP services were OK.
That's fixed :)

Myshaak said...

¨Thank you, you saved my company :)

Anonymous said...

Thank you. Just for your information, Telnet 127.0.0.1 143 works fine, but not the Telnet on the server IP Address. Same problem with CU11 (problem only occurs on one node of my 2 node cluster).

Andrew Grant said...

This saved me pulling my hair out, thank you!

Anonymous said...

saved my day, thx!

dc said...

Huge save from your blog. CU11 cause the proxy to go offline. This was the fix. Thanks!!!

Anonymous said...

YESSSSS, also worked for me. Thanks!

Anonymous said...

cu12 did the same, this fixed it! thank you!

Anonymous said...

Same issue with CU13. This fixed it.

guitman423 said...

Confirmed also after CU13, this fixed it.

Is this a fix that will last after a reboot?

Peter Bertran said...

This saved my skin just like the rest- thank you. I did have to run the command twice and restart the IMAP service, but it worked!

Arjan said...

Lifesaver. Dankjewel vanuit Assen.

Anonymous said...

Same on Exchange 2016. Thank you, that saved a lot of time!! ;)

Heiko said...

Same issue with CU13 stand-alone. It occured out of the blue after a reboot.
This fixed it, thank you very much!!!

Anonymous said...

Very Very Good Post, amazing!! It solved my problem.
Thanks a lot!

Ray Cockshell said...

Many thanks for this lifesaver.
Happened to me after applying Windows Updates and rebooting.
Was at CU11 at the time, updating to CU15 did not fix it.
Nothing in any logs, even with Diagnostic Logging turned up.
Just a reminder to turn off all logging now we know where to look.

Anonymous said...

Thanks for the Fix!

Anonymous said...

Not sure what causes this, but it seems to happen when the server does not have a graceful shutdown. We just had a 2 power outages where the UPS ran out of juice. Did not get to server in time to have a graceful shutdown, and had this issue (and fix).

Graceful shutdowns do not seem to result in this issue for me.

Anonymous said...

thanks Jetze,

After a restart of the IMAP4 service we encountered the same issue (even on CU15!). Your description of the issue & how to resolve it saved me a lot of headache! regards from Scheveningen!

Paul W

Anonymous said...

Thanks Jetze,

Just ran into the same problem and have been beating my head against the wall for 3 hours. Resolution worked a treat.

Cheers,

CM

Anonymous said...

Also ran into this issue and your resolution helped us out as we are not Exchange SMEs - thank YOU!

Anonymous said...

Damn, had the same problem, thanks a ton for this!

Thanks,
Dominik

Anonymous said...

when I telnet localhost, i'm getting response as expected but when I telnet the fqdn internet, no response and blank screen.

I made ImapProxy with above command, restated the imap service and all is working fine

Anonymous said...

YOU SAVED MY LIFE BRO !!!!!
Thanks a lot

Anonymous said...

Many thanks man! Initially my health checks were failing so I restarted IMAP and make sure health checks are fine but IMAP was still not working. Rebooted the server, thought some other service is still stuck but it didn't fix the issue. Everything started to work after I enabled the services!

Kenny said...

i LOVE you