Applies to: Exchange Server 2007 SP3, Exchange Server 2007 SP2, Exchange Server 2007 SP1
Topic Last Modified: 2007-09-21
This topic explains how to configure Microsoft Exchange Server 2007 to enable certificate logging for Simple Mail Transfer Protocol (SMTP), Post Office Protocol version 3 (POP3), and Internet Message Access Protocol 4rev1 (IMAP4). You can use certificate logging to troubleshoot certificate-related problems.
By default, Exchange 2007 logs certificate activity in the Windows event log.
You can enable certificate logging to write to a file or to write to the Exchange Management Shell.
To enable certificate logging to a file, you must update the configuration file for the appropriate component. The following table specifies the configuration file that you must update for each component.
POP3
Microsoft.Exchange.Pop3.exe.config
%programfiles%\Microsoft\Exchange Server\ ClientAccess\PopImap
Microsoft Exchange POP3
IMAP4
Microsoft.Exchange.Imap4.exe.config
Microsoft Exchange IMAP4
SMTP
EdgeTransport.exe.config
%programfiles%\Microsoft\Exchange Server\Bin
Microsoft Exchange Transport Service
Changes that are saved to the .config files are applied after the associated Microsoft Exchange service is restarted.
To enable certificate logging, you must update the .config file by using the following XML snippet:
<system.diagnostics> <sources> <source name="Microsoft.Exchange.Security.Certificate" switchName="Certificate"> <listeners> <add name="Certificates" type="System.Diagnostics.TextWriterTraceListener" initializeData= "d:\temp\certificate.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>
You put this XML snippet anywhere between the <configuration> and </configuration> tags in the .config file. You must copy and paste the whole XML snippet into the .config file. If you do not paste the whole XML snippet, certificate logging will not be enabled and the associated Microsoft Exchange service may log errors or otherwise fail.
<configuration>
</configuration>
To change the location of the output log, change the path listed in the initializeData element under the <listeners> tag.
initializeData
<listeners>
By default, this XML snippet enables verbose certificate logging for the associated component. You can reduce the amount of logging by changing value="Verbose" to value="Informational" under the <switches> tag.
value="Verbose"
value="Informational"
<switches>
To perform the procedures in this topic, the account you use must be delegated the following:
For more information about permissions, delegating roles, and the rights that are required to administer Exchange 2007, see Permission Considerations.
On the server that is running Microsoft Exchange on which you want to enable certificate logging, open the appropriate .config file in an ASCII Text Editor, such as Notepad. See the table in the "Logging to a File" section of this topic for the location of each .config file.
Copy and paste the following XML snippet anywhere between the <configuration> and </configuration> tags:
After you have pasted the XML snippet, save the .config file and close it.
You must restart the associated Microsoft Exchange service before the configuration changes will take effect.
If you enable certificate logging to write to the Exchange Management Shell, you can view certificate activity when you run the following cmdlets:
Unlike when you log to file, where you must update multiple .config files to output logging for POP3, IMAP4, and SMTP, you can enable logging to write to the Exchange Management Shell for all components by creating a Powershell.config file. You must save the Powershell.config file to the same directory from which Powershell.exe is run. Powershell.exe is typically run from one of the following locations:
On the Exchange server on which you want to enable certificate logging, open an ASCII Text Editor, such as Notepad.
Copy and paste the following XML snippet into a new text file:
<configuration> <system.diagnostics> <sources> <source name="Microsoft.Exchange.Security.Certificate" switchName="Certificate"> <listeners> <add name="Certificates" type="System.Diagnostics.ConsoleTraceListener"/> <remove name="Default"/> </listeners> </source> </sources> <switches> <add name="Certificate" value="Verbose"/> </switches> <trace autoflush="true" > <listeners> <add name="Certificates"/> </listeners> </trace> </system.diagnostics> </configuration>
Save the file to the appropriate WindowsPowerShell\v1.0 directory as Powershell.config.
You must restart the Exchange Management Shell before these configuration changes will take effect.
For more information, see Certificate Use in Exchange Server 2007.