Skip to content

Mail.que file growing in Exchange Server

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 will look at the Safety Net in Exchange Server. In this article, you will learn why the mail.que keeps growing in Exchange Server.

Mail.que file keeps growing in Exchange Server

We recommend you to follow these steps:

  1. Move mail queue to another disk drive
  2. Delete mail.que file if it’s large in size
  3. 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

Sign in to Exchange Server. Run Exchange Management Shell as administrator. Make use of the Get-TransportConfig cmdlet. It’s showing 7 days.

Note: 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 show the value of 2 days. So 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 look at it.

  • Sign in to 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.

Note: 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. Run 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 use 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?

Read more: Exchange 2010 end of life support »

Conclusion

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.

ALI TAJRAN

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *