Logging SMTP Protocol Activity in Exchange 2007 / 2010

Enable protocol logging on a Receive Connector

Set-ReceiveConnector “Connector Name” -ProtocolLoggingLevel verbose

Receive Connector logs default path:

  • Exchange 2010: \Exchange Server\V14\TransportRoles\Logs\ProtocolLog\SmtpReceive
  • Exchange 2007: \Exchange Server\TransportRoles\Logs\ProtocolLog\SmtpReceive

To change:

Set-TransportServer “TRANSPORT SERVER NAME” -ReceiveProtocolLogPath “C:\Directory”

Enable protocol logging on a Send Connector

Set-SendConnector “Send Connector Name” -ProtocolLoggingLevel verbose

Send Connector logs default path:

  • Exchange 2010: \Exchange Server\V14\TransportRoles\Logs\ProtocolLog\SmtpSend
  • Exchange 2007: \Exchange Server\TransportRoles\Logs\ProtocolLog\SmtpSend

To change:

 Set-TransportServer “TRANSPORT SERVER NAME” -SendProtocolLogPath “C:\Directory”

Swap SMTP banner in Exchange 2010 from PowerShell

Replace the internal name to the correct server for designation:

Set-ReceiveConnector "connector" -Banner "220 real_name_of_server"

real_name_of_server : reverse DNS name of mail server (for example: mail.firm.com). In any case be the top 220, RFC!