• 1. London, UK
  • 2. Sydney, Australia
  • 3. New York, NY
  • 4. Melbourne, Australia
  • 5. Bellevue, WA
  • 6. Paris, France
  • 7. Moscow, Russia
  • 8. Chicago, IL
  • 9. San Francisco, CA
  • 10. Amsterdam, Netherlands

Thursday, May 03, 2007

 

Exchange Server 2007: Logging SMTP Protocol Activity

Posted by Bharat Suneja at 1:07 PM
I wrote about SMTP logging in Exchange Server 2003/2000 [read previous post - "Logging SMTP protocol activity"]. Exchange Server 2007 has its own SMTP stack, and what I like to think of as smarter or more intelligent Receive Connectors (these are protocol listeners, equivalent of the SMTP Virtual Server we've known from Exchange Server 2003/2000 - Bharat). I hoped to see (SMTP) protocol logging turned on by default on these connectors. However, like the previous versions, it's not. You have to remember to enable (SMTP) protocol logging on transport servers.

To enable protocol logging on Receive Connectors, use the following command:

Set-ReceiveConnector "Connector Name" -ProtocolLoggingLevel verbose

In case you're wondering if there are any choices for the logging level - there aren't. It's either verbose or none.

To enable protocol logging from the Exchange console, go to Server Configuration | Hub Transport | select the Hub Transport server you want to configure | select the Receive Connector -> properties | General tab | change Protcol logging level to Verbose, as shown in the screenshot below.



Unlike Exchange Server 2003/2000, you have to enable logging separately for Send Connectors (equivalent of SMTP Connectors), using the following command:

Set-SendConnector "Send Connector Name" -ProtocolLoggingLevel verbose

To do this using the Exchange console, go to Organization Configuration | Hub Transport | Send Connectors tab | select the Send Connector -> properties | General tab | change Protocol logging level to verbose.

Besides the visible Receive and Send connectors, an invisible Send Connector lurks under the hood - used to transport messages within the organization, between Hub Transport servers, Edge Transport servers, and Exchange Server 2003/2000 servers. It's the Intra-Organization Send Connector. You won't see it in the console, or in the shell if you use the get-SendConnector command. To configure protocol logging for this Intra-Organization Send Connector:

Set-TransportServer "TRANSPORT SERVER NAME" -IntraOrgConnectorProtocolLoggingLevel verbose

Where do these protocol logs reside?

- Unlike Exchange Server 2003/2000, which maintain separate protocol logs for each instance of a SMTP Virtual Server, all Receive Connectors share "SmtpReceive" logs. Similarly, Send Connectors share "SmtpSend" logs.
- Receive Connector logs are located in
\Exchange Server\TransportRoles\Logs\ProtocolLog\SmtpReceive
- Send Connector logs are located in
\Exchange Server\TransportRoles\Logs\ProtocolLog\SmtpSend

How do you change the path of SMTP logs?


To change the path of SmtpReceive logs:

Set-TransportServer "TRANSPORT SERVER NAME" -ReceiveProtocolLogPath "C:\New SmtpReceive Log File Directory"

To change the path of SmtpSend logs:

Set-TransportServer "TRANSPORT SERVER NAME" -SendProtocolLogPath "C:\New SmtpSend Log File Directory"

If you do decide to change the path, ensure the new directories/folders exist with appropriate permissions, as outlined in "How to Configure Protocol Logging" in the product documentation. In addition to the above, you can also control the maximum log file size, the maximum directory size, and the maximum age of log files. This ensures you don't have to worry about purging the logs manually over time, or scheduling a script to do this periodically.

SMTP logs are an important troubleshooting tool - enabling SMTP logging after the fact isn't any help when troubleshooting SMTP mail flow.

Labels: , , ,

2 Comments:

June 11, 2007 11:52 PM
Anonymous Anonymous said...

Hi, the command is "set-transportserver "servername" -IntraOrgConnectorPROTOCOLLogginglevel verbose , not IntraOrgConnectorLogginglevel

 
June 12, 2007 7:03 AM
Blogger Bharat Suneja said...

Thanks for catching that - it should be -IntraOrgConnectorProtocolLoggingLevel. Corrected.

 

Post a Comment

Links to this post:

Create a Link

<< Home