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.

54 comments:

  1. Hi !

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

    Thx a lot !!

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

    ReplyDelete
  3. Brilliant fix. Saved my skin. Thank you.

    ReplyDelete
  4. 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!

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

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

    ReplyDelete
  7. 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.

    ReplyDelete
  8. Also needed in Exchange 2016 Preview...

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

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

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

    ReplyDelete
  12. Same issue Exchange 2013 sp1 cu9

    Thumbs up!

    ReplyDelete
  13. Thank You!!!!!!!!!!!!

    ReplyDelete
  14. Thanks you very much!!

    ReplyDelete
  15. Jetze, thank you so much, a very helpful hint!

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

    ReplyDelete
  17. 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

    ReplyDelete
  18. 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.

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

    ReplyDelete
  20. Thanks! Cool solution. It's work!

    ReplyDelete
  21. 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

    ReplyDelete
  22. Thanks !

    this help me to solve Imap service at my organization

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

    TNX

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

    ReplyDelete
  25. ¨Thank you, you saved my company :)

    ReplyDelete
  26. 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).

    ReplyDelete
  27. This saved me pulling my hair out, thank you!

    ReplyDelete
  28. saved my day, thx!

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

    ReplyDelete
  30. YESSSSS, also worked for me. Thanks!

    ReplyDelete
  31. cu12 did the same, this fixed it! thank you!

    ReplyDelete
  32. Same issue with CU13. This fixed it.

    ReplyDelete
  33. Confirmed also after CU13, this fixed it.

    Is this a fix that will last after a reboot?

    ReplyDelete
  34. 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!

    ReplyDelete
  35. Lifesaver. Dankjewel vanuit Assen.

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

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

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

    ReplyDelete
  39. 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.

    ReplyDelete
  40. Thanks for the Fix!

    ReplyDelete
  41. 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.

    ReplyDelete
  42. 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

    ReplyDelete
  43. 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

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

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

    Thanks,
    Dominik

    ReplyDelete
  46. 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

    ReplyDelete
  47. YOU SAVED MY LIFE BRO !!!!!
    Thanks a lot

    ReplyDelete
  48. 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!

    ReplyDelete
  49. This was just what I needed.
    Thanks!

    ReplyDelete
  50. +1 for this. !!! nice job man!

    ReplyDelete
  51. Thank you! Upgraded Exchange 2013 Build 1395.4 DAG and this fixed my issue. I was seeing this problem via a Kemp LoadBalancer.

    ReplyDelete
  52. Thanks man! You did help for a lot of people!

    ReplyDelete