How to enable IMAP debug on Exchange Server 2013/2016

Share this:

Nowadays, IMAP is not configured as used to be and the protocol has been deprecated on Exchange Server and SaaS (Software as a Service) for a while, however there are a lot of customers and services that still use it and it is fully supported on Exchange Server. In this Tutorial we are going over the process to enable debug on this component.


By default, the debug is disabled for imap protocol. The process to enable is to change um parameter on the service and restart the service.  Please enable the debug only during troubleshooting scenarios and for a certain period of time, having the debug enable all time decreases the performance of Exchange Server.

In order to enable the debug of imap, these two cmdlets are required:

Set-IMAPSettings –ProtocolLogEnabled $True

Restart-Service *imap*


We can always use services.msc to restart the services (in this scenario we have a single server) and all IMAP4 services must be restarted as part of the process.


After restarting the IMAP services, the administrator can check the folder C:Program FilesMicrosoftExchange ServerV15LoggingImap4 (this path was based on the default installation folder of Exchange Server 2013) and the log files will start showing up on that location. The log file with BE is related to the IMAP Backend Service.


If the administrator opens that file a lot of information about the connections will be logged, such as datetime, session id, duration, source and client IPs, command, parameters and so forth.


How to disable the imap debug?

The process is simple, just run these following cmdlets on the server and the original settings (logging disabled) will be restored.

Set-IMAPSettings –ProtocolLogEnabled $False

Restart-Service *imap*

Written by Anderson Patricio

Anderson Patricio

Anderson Patricio is a Canadian MVP in Cloud and Datacenter Management, and Office Server and Services, besides the Microsoft Award he also holds a Solutions Master (MCSM) in Exchange and several other certifications. Anderson has been contributing to the Microsoft Community with articles, tutorials, blog posts, twitter, forums and book reviews. He is a regular contributor here at,, and Anderson (Portuguese).