Mail.que Corrupt or Large File Size Issue in Exchange 2013/10/16/07
Hello guys, in this article, I am going to have a discussion about Mail.que file corrupt or large size of queue database file issue. As you might know, Mail.que is a temporary file which is being created in sending queue of Exchange server. When each mail is being sent, then it goes into the sending queue of Exchange server and then it is being delivered to the recipient mailbox. With passing the time, it has been necessary to maintain mail.que database time to time for fixing the common issues, like performance issue in the case of a large or fragmented file for removing white spaces. Nowadays, if the mail.que temporary database file is not being maintained from time to time then it may lead into the email burst situation especially in the case of large file attachments.
Prerequisites for Maintaining Mail.que File
There are some following prerequisites, which you should have for fixing the issues as well as maintaining the mail.que file.
- You should have Exchange Server Administrator account access.
- You should have full control for Network management, System as well as User account management.
- For restoration of mail.que file from another transport server to another then it is necessary that both transport servers should be hosted within an Active Directory forest.
Restoration of Mail.que Database File
In this section, we will see the complete process mail.que database restoration using commands as well as EAC or EMC. For every different version of Exchange Server, we have to go with different restoration techniques.
Exchange 2007 / Exchange 2010 Large mail.que File
- Locate the databaseNavigate at the below-mentioned location for getting mail.que file in Exchange Server 2007/2010.
In hub transport server:
C:\Program Files\Microsoft\Exchange Server\TransportRoles\data\Queue
In Edge Transport server:
C:\Program Files\Microsoft\Exchange Server\Bin
- Disconnect the mail.que file and create a new one for not stopping the mail flow now select Mail.que, Trn.chk, Temp.edb, Trn.log, Trnnnn.log, Trnres00001.jrs, Trnres00002.jrs, and Trntmp.log and put into any other temporary folder/location. Now restart the Exchange server, in this case again a new mail.que file would be created and the mail flow won’t stop.
- Fixing issues & Maintaining the database now, run the below-mentioned command in PowerShell. For running this command you have to specify the complete location of Mail.que file.
Command: eseutil /d [CompleteLocation]/mail.que
- Put mail.que into transport server by replacing the existing oneFirst of all pause the current mail flow in Exchange server by running the below-mentioned command:
Net Pause MSExchangeTransport
Now make sure whether all mail flow has stopped or not by running the below mentioned command:
Get-Queue
Now resubmit the unreachable queues:Retry-Queue –Identity "Unreachable" -Resubmit $True
Now reinject the mail.que into the transport server:
For this just stop MSExchangeTransport Service, then copy & paste the mail.que file into the earlier location in Transport server database location and start MSExchangeTransport again.
That’s all what you have to do in case of Exchange 2007.
Move Mail.que File in Exchange 2013 / 2016
In the case of Exchange server 2013/2016, we are about to change the location of mail.que file at another location.
- First, create the new folder where you want to keep the database and transaction log.
- Run below command to open Exchange transport configuration file.
Notepad %ExchangeInstallPath%Bin\EdgeTransport.exe.config
- Modify the key value in
appSetting
tag as displayed below.
- Now, save and close the configuration file.
- Now, restart Exchange transport service by running the following command:
net stop MSExchangeTransport && net start MSExchangeTransport
- Now, go to the new location to check for newly created files.
- Now, stop the Exchange Transport Service by running below mentioned command:
net stop MSExchangeTransport
- Move all existing transactions log files (Trn.log, Trntmp.log, Trnnnnnn.log, Trnres00001.jrs, Trnres00002.jrs, and Temp.edb) as well as database files (Mail.que and Trn.chk) into the new location. Note: If you are having very large mail.que file then you can delete it rather than moving.
- Now start the Exchange Transport Server again by running below command:
net start MSExchangeTransport
- Now, at last, verify queue database files as well as transaction log files at a new location, and also make sure that not a single file should be available at an old location.
That’s All what you have to do for getting rid of Mail.que large size/corruption Issue in Exchange 2016/2013/2010/2007.
You Can Also Read: Methods to Recover corrupted Exchange Server Mailboxes
Conclusion: Mail.que File Large in Size or Corrupted
In this article, we had a discussion about how to overcome from the large mail.que file or mail.que corrupted situation in Exchange Server 2007/2010/2013/2016. There are two different scenarios which are discussed, one for Exchange 2010/2007 Mail.que file and second for Exchange 2013/2016. In the case of Exchange 2007/2010, we have repaired the existing mail.que file at its default location. But in the case of Exchange 2016/2013, we have changed the location or transport database file (mail.que & trn.chk) as well as transaction log files. We can also try repairing the mail.que file in case of Exchange 2013 or Exchange Server 2016 with the help of same used command for Exchange 2007 / 2010.