Mail.que is growing larger and occupying more disk space.
This is by design and it is because of the new feature called Safetynet in Exchange 2013.
By default the safetynet hold time is 2 days, Exchange 2013 server holds 2 days mail in transport database and will purge those mails after 2 days. The mail.que file will not shrink because the space occupied by those purged mails will remain as whitespace.
- We can set the safetynethold time as 1 day or 12 hours or 5 min to reduce the growth rate of mail.que. Please refer the blog given in reference to understand the working of safetynet feature and how to change it using PowerShell.
The mail.que file should be monitored on a daily basis and should be recreated to free up the disk space. Please follow the steps below to recreate the mail.que file.
Go to Run by pressing Win + R. Type services.msc
- Pause the transport service
- Check for the messages in queue using the command Get-queue and wait till all active messages become zero.
- Once the queue becomes zero stop the transport service, move the mail.que and other files to a new folder in the same location.
- Start the transport service which will recreate the mail.que file.
- The folder which contains the old mail.que can be deleted to free up the disk space.
Working of Safetynet feature
PowerShell Command to change the Safetynetholdtime