Enable POP3 and IMAP4 Logging

For testing purposes it can be useful to enable protocol logging on the POP3 and/or IMAP4 service. In Exchange 2010 this cannot be done using the Exchange Management Console or the Exchange Management Shell like you would do to enable protocol logging on the Send or Receive Connector but needs to be done using a config file.

There’s a Microsoft.Exchange.Pop3.exe.config or similarly a Microsoft.Exchange.Imap4.exe.config file located in the directory C:\Program Files\Microsoft\Exchange Server\ClientAccess\PopImap on the Exchange 2007/2010 Client Access Server.

When you open the file scroll down and locate the “ProtocolLog” key and set its value to “true”, like this:

<add key="ProtocolLog" value="true" />

When changed restart the POP3 or IMAP4 service in the Exchange Management Shell using the following command:

Restart-service MSExchangePop3
Restart-Service MSExchangeImap4

The log files can be found in the directory C:\Program Files\Microsoft\Exchange Server\Logging\Pop3

When you’re finished with troubleshooting don’t forget to disable protocol logging since it will consume a tremendous amount of disk space. Just to give you an idea, this is in the POP3 log file for only one session:


In Exchange 2013 it’s a bit different, you can use the Set-PopSettings cmdlet (and Set-ImapSettings cmdlet) to enable logging and set the directory where the log files are stored, for example:

Set-PopSettings -ProtocolLogEnabled $true -LogFileLocation "C:\Pop3Logging"

One thought on “Enable POP3 and IMAP4 Logging”

  1. Set-PopSettings -ProtocolLogEnabled $true -LogFileLocation “C:\Pop3Logging” etc. is enabled in Exchange 2010 SP3 as well (not sure when it turned up, but the cmdlets work and the config file edit is not required.


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s