Your Exchange Server infrastructure needs to stay up to date because of vulnerabilities, new features,…
The mail.que file is growing in Exchange Server 2013/2016/2019. The disk size is getting full because of the mail.que file keeps growing. How to solve this once and for all? This time we are going to have a look at the Safety Net in Exchange Server. In this article, you will learn why the mail.que keeps growing in Exchange Server.
Table of contents
Mail.que file keeps growing in Exchange Server
We recommend you to follow these steps:
- Move mail queue to another disk drive
- Delete mail.que file if it’s large in size
- Check Safety Net in Exchange Server (in this article)
Before we check the Safety Net, let’s have a little understanding of what it is.
Safety Net in Exchange Server
In Exchange 2010, the transport dumpster helped protect against data loss by maintaining a queue of successfully delivered messages that hadn’t been replicated to the passive mailbox database copies in the database availability group (DAG). When a mailbox database or server failure required the promotion of an out-of-date copy of the mailbox database, the messages in the transport dumpster were automatically resubmitted to the new active copy of the mailbox database.
The transport dumpster was improved in Exchange 2013 and is now called Safety Net. Exchange 2016 and Exchange 2019 have these same improvements.
Safety Net and Transport Dumpster similarities
The Safety Net is similar to the transport dumpster in Exchange 2010:
- Safety Net is a queue that’s associated with the Transport service on a Mailbox server. This queue stores copies of messages that were successfully processed by the server.
- You can specify how long Safety Net stores copies of the successfully processed messages before they expire and are automatically deleted. The default is 2 days.
Check Safety Net hold time
Log in to the Exchange Server. Run Exchange Management Shell as administrator. Make use of the Get-TransportConfig cmdlet. It’s showing 7 days.
The SafetyNetHoldTime default value is 2 days.
[PS] C:\>Get-TransportConfig | Select SafetyNetHoldTime SafetyNetHoldTime ----------------- 7.00:00:00
Installing Exchange Server 2013/2016/2019 in the organization should be showing the value of 2 days. Why is the SafetyNetHoldTime showing 7 days?
The only explanation is that it was set by someone else because you can adjust the value. If that is not the case, it’s because you had an Exchange Server 2010 in the organization. You installed an Exchange Server 2013/2016 in the organization next to the Exchange Server 2010. The Exchange Server 2013/2016 will copy the Exchange Transport dumpster settings from Exchange Server 2010.
Exchange Transport dumpster
The Exchange Transport dumpster is only for Exchange 2007/2010. In Exchange 2013/2016/2019, it’s the Safety Net. Did you already uninstall Exchange Server 2010? Go to the next step to set the SafetyNetHoldTime to the default value of 2 days. If you still have Exchange 2010 running in coexistence with Exchange Server 2016/2019, let’s have a look at it.
Log into Exchange Server 2010. Run Exchange Management Shell as administrator. Run the cmdlet in Exchange Server 2010. It’s showing the MaxDumpsterTime default value of 7 days.
The MaxDumpsterTime default value is 7 days.
[PS] C:\>Get-TransportConfig | Select MaxDumpsterTime MaxDumpsterTime --------------- 7.00:00:00
In the next part, you will set the SafetyNetHoldTime in Exchange Server 2013/2016/2019. This will help you to keep the mail.que from growing.
Configure Safety Net hold time
Set the default value of 2 days. Make use of the Set-TransportConfig cmdlet, including the -SafetyNetHoldTime parameter.
You can get a warning after running the cmdlet. Ensure that the Safety Net hold time value is lower than the replay lag time in a mailbox database copy. That’s only if you are using them. If you don’t use it, ignore the warning.
[PS] C:\>Set-TransportConfig -SafetyNetHoldTime 2.00:00:00 WARNING: Setting 'SafetyNetHoldTime' to a value lower than 'ReplayLagTime' in a Mailbox database copy can cause irrecoverable data loss. Please ensure that the 'SafetyNetHoldTime' parameter is set to a value equal or greater than the 'ReplayLagTime' parameter, which is set using the Set-MailboxDatabaseCopy cmdlet.
Verify Safety Net hold time
It’s always good to verify the changes after configuring them.
[PS] C:\>Get-TransportConfig | Select SafetyNetHoldTime SafetyNetHoldTime ----------------- 2.00:00:00
Looking great! Did this help you to solve the mail.que file growing in Exchange Server?
In this article, you learned why the mail.que file keeps growing in Exchange Server. Move the mail.que file to another disk location to keep it separated and not filling up the C: drive of the Exchange Server. Remove the mail.que database if it’s large in size. As of last, have a look at the safety net hold time and change it to the default value of 2 days.
Did you enjoy this article? You may also like Find Exchange version with PowerShell. Don’t forget to follow us and share this article.