Exchange 默认日志流保存45天,根据实际需求,可更改

下面命令是将,日志单文件设定为20MB、文件夹50G、保存天数365天

Set-TransportService xxxxx -MessageTrackingLogPath "D:\Program Files\MicroSoft\Exchange Server\V15\TransportRoles\Logs\MessageTracking" -MessageTrackingLogMaxFileSize 20MB -MessageTrackingLogMaxDirectorySize "51200 MB" -MessageTrackingLogMaxAge 365.00:00:00

参考:
https://docs.microsoft.com/en-us/exchange/mail-flow/transport-logs/configure-message-tracking?view=exchserver-2019