Check SMTP log file on Exchange 2010

AXISHK
AXISHK used Ask the Experts™
on
How to enable the detail mail flow tracking on Exchange 2010 ?

Is it possible to rotate these log to save disk space, keep for 14 days only ?

Thx
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Fethi ABASSIWindows system administrator
Commented:
Hi,
With powershell you can use
Get-MessageTrackingLog
To change the path:
Set-TransportServer <Identity> -MessageTrackingLogPath <LocalFilePath>
Run the following command on a Mailbox server:
Set-MailboxServer <Identity> -MessageTrackingLogPath <LocalFilePath>

Link:
https://technet.microsoft.com/en-us/library/cc539073.aspx

Author

Commented:
I mean the detail IP information and negotiation. Can this be setup through GUI ?

Thx
Fethi ABASSIWindows system administrator

Commented:
This is an exemple:
I guess it's possible just with powershell
get-messagetrackinglog -Server "servername" -EventID "RECEIVE" -Start "04/15/2017 7:19:00 AM" -End "04/15/2017 10:29:00 AM" | select-object sender,recipients,serverip | sort-object ServerIP | Out-File c:\report.txt
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Shaun VermaakTechnical Specialist
Awarded 2017
Distinguished Expert 2018
Commented:
As for log retention, you should use circular logging. If you cannot use it for some reason, look at this article
https://www.experts-exchange.com/articles/29108/Log-file-problem-CircularLogArchiver.html

Author

Commented:
Is it same as the one that configured with powershell command ? I have tried and see some information in SMTP recevie log...

Thx
C--temp-SMTP-Log.png
Associate Ops Manager
Commented:
Message tracking logs will maintain up to 30 days by default in Exchange 2010, if you want detail message track log, you have to enable the SMTP log

For Single Connector

Set-ReceiveConnector “<Connector Name>” -ProtocolLoggingLevel verbose

Open in new window


For Multiple Connector

Get-ReceiveConnector | Set-ReceiveConnector -ProtocolLoggingLevel verbose

Open in new window

Shaun VermaakTechnical Specialist
Awarded 2017
Distinguished Expert 2018

Commented:
Glad we could help.

@OP, experts and future visitors:
Please remember to endorse my, or any other expert's comments that you found helpful by clicking on the "Thumb's Up" button

Read more on endorsements
https://www.experts-exchange.com/discussions/218503/What-are-Endorsements.html

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial