Exchange Server 2016管理系列課件37.通過搜索傳輸日誌查看郵件收發狀況
查詢用戶郵件是否成功投遞
查詢用戶郵件投遞失敗的原因
協助分析產生郵件退信的原因(郵件可能根本沒有到我們的服務器)
powershell查看傳輸日誌
常見EVENTID的含義:
DELIVER 郵件已傳遞到郵箱。
DEFER 郵件傳遞延遲。
FAIL 郵件傳遞失敗。
RECEIVE 郵件已接收並提交到數據庫。
SEND 簡單郵件傳輸協議 (SMTP) 將郵件發送到不同的服務器。
郵件跟蹤 https://technet.microsoft.com/zh-cn/library/bb124375(v=exchg.160).aspx
查看特定收件人之間的郵件投遞信息
Get-TransportService | Get-MessageTrackingLog -Sender:[email protected] -Recipients:[email protected]
查看某一時間段,狀態為deliver的投遞信息
Get-TransportService | Get-MessageTrackingLog -Sender:[email protected] -Recipients:[email protected] -Start "2017/4/11 09:00:00" -End "2017/4/13 09:00:00" -EventId deliver
篩選結果並輸出到屏幕
Get-TransportService | Get-MessageTrackingLog -Sender:[email protected] -Recipients:[email protected] -Start "2017/4/11 09:00:00" -End "2017/4/13 09:00:00" -EventId deliver | Select Sender,Recipients,timestamp,eventid,messagesubject
將篩選的結果輸出到CSV
Get-TransportService | Get-MessageTrackingLog -Sender:[email protected] -Recipients:[email protected] -Start "2017/4/11 09:00:00" -End "2017/4/13 09:00:00" -EventId deliver | Select Sender,Recipients,timestamp,eventid,messagesubject | Export-Csv c:\ps\mail.csv -Encoding Default -NoTypeInformation
進階
查看默認服務器上傳輸日誌的保存位置。
進入到傳輸日誌保存的目錄下面,可以看到有很多的log,這些log就是我們的傳輸日誌文件。
除了通過命令查詢之外,也可以直接打開當天的log進行查看。
可以把log文件直接拖到excel裏面查看。
實際案例
如何通過郵件頭和傳輸跟蹤日誌查看原始客戶端IP - 曾垂鑫的技術專欄 - 51CTO技術博客 http://543925535.blog.51cto.com/639838/1735548
獲取更多IT資訊,您也可以關註下方的微信公眾號:
曾垂鑫的網絡課堂,曾垂鑫大講堂 - 51CTO學院
http://edu.51cto.com/lecturer/639838.html
Exchange Server 2016管理系列課件37.通過搜索傳輸日誌查看郵件收發狀況