Wednesday, 18 March 2015

How to Enable Certificate Logging for POP3/SMTP/IMAP4 in Exchange Server 2007

Be default, Exchange Server 2007 logs certificate messages in the Event Viewer. We can configure the Exchange 2007 to write logs for POP3/SMTP/IMAP4 in a file. This can be done by adding below XML text into each POP3/SMTP/IMAP4 .config files.
We can find these .config files in this location:-
POP3 %Program Files%\Microsoft\Exchange Server\ClientAccess\PopImap\Microsoft.Exchange .Pop3.exe.config
IMAP %Program Files%\Microsoft\Exchange Server\ClientAccess\PopImap\Microsoft.Exchange .Pop3.exe.config
SMTP %Program Files%\Microsoft\Exchange Server\Bin\EdgeTransport.exe.config
You can paste below XML text anywhere between the <configuration> and </configuration>
Tags in the .config file.
<system.diagnostics>
<sources>
<source name="Microsoft.Exchange.Security.Certificate" switchName="Certificate">
<listeners>
<add name="Certificates"
type="System.Diagnostics.TextWriterTraceListener"
initializeData= "E:\TMP\certificate_logging.log" traceOutputOptions="ThreadId, DateTime"/>
<remove name="Default"/>
</listeners>
</source>
</sources>
<switches>
<add name="Certificate" value="Verbose"/>
</switches>
<trace autoflush="true" >
<listeners>
<add name="Certificates"/>
</listeners>
</trace>
</system.diagnostics>
Above snippet will save the log files in the E:\TMP\certificate_logging.log location. You can change this location to anywhere.
By default, verbose logging is enabled in the above snippet. You can change it to informational for reduced amount of logging.
<add name="Certificate" value="informational"/>

No comments:

Post a Comment