1、设置环境变量:
$ExchangeServerName = $env:ComputerName
$ExchPath = $env:ExchangeInstallPath
$ExchLogs = "Q:\ExchLogs"
$IISLogs = "Q:\IISLogs"
$DTLPath = "$ExchLogs\DiagnosticsLogs"
$LoggingPath = "$ExchLogs\Logging"
$TransportPath = "$ExchLogs\TransportRoles"
2、邮箱数据库的 Transaction Logs:
1)将邮箱数据库和日志文件放置在单独管理的文件夹或驱动器中。
Move-DatabasePath -Identity DB01 -EdbFilePath F:\DB01\DB01.edb -LogFolderPath F:\DB01_Logs
2)使用支持 Volume Shadow Copy(CSV)的备份软件定期清理 Transaction Logs。
3)如果在一段时间内,暂时不能使用备份软件清理 Transaction Logs,则启用 Circular Logging:
Dismount-Database -Identity DB01
Set-MailboxDatabase -Identity DB01 -CircularLoggingEnabled $True
Mount-Database -Identity DB01
注意,备份软件恢复后,取消 Circular Logging。
3、邮件队列的 Queue Database Logs:
1)确认邮件队列数据库的默认位置;
%ExchangeInstallPath%TransportRoles\data\Queue
2)创建存放队列数据库和日志文件的文件夹,如;
Q:\ExchLogs\TransportRoles\data\Queue
3)编辑 EdgeTransport.exe.config 文件:
Notepad %ExchangeInstallPath%Bin\EdgeTransport.exe.config
4)定位并修改以下设置:
<add key="QueueDatabasePath" value="Q:\ExchLogs\TransportRoles\data\Queue" />
<add key="QueueDatabaseLoggingPath" value="Q:\ExchLogs\TransportRoles\data\Queue" />
保存 EdgeTransport.exe.config 文件