Tag Archives: Exchange 2010. POP3

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:

image

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"