none
large old mail.que file RRS feed

  • Question

  • Hi,

      On one of my Exchange 2016 on-premise sever it has a large mail.que (~58 GB) under C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Queue.  The last modified date is 8/9/2019 9:31 AM.  Can I delete it safely?  I do use lagged copies but not sure if it has anything to do with it. Or can I move it to another volume?  It's taking too much space on C:.

    Thanks in advance


    • Edited by ChrisD0919 Tuesday, November 12, 2019 12:09 AM
    Monday, November 11, 2019 11:57 PM

Answers

  • As is mentioned in Change the location of the queue database, if you want to create a new queue database and transaction logs in a new location, you have to modify the config file and restart the Exchange Transport service; if you move the existing queue database and transaction logs, you have to modify config file, stop the service to move files and start Exchange Transport service.

    Modification made in Exchange XML application configuration files will be overwritten when you install an Exchange CU. After you install the Exchange CU, you need to re-configure these settings.

    Regards,

    Lydia Zhou


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Sunday, November 17, 2019 4:47 PM
    Moderator

All replies

  • Hi,

    You can rebuild the mail.que to get a smaller mail.que via the following steps.

    1. Run the following command and make a note from the count of messages on the server:

    Get-Queue


    2. Pause Microsoft Exchange Transport service from Services tool.

    3. Run Get-Queue again and make sure that the queues are empty.

    4. If the queues are empty, then you can stop the Microsoft Exchange Transport service.

    5. Move all files inside the C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Queue folder into a backup folder.

    6. Restart Microsoft Exchange Transport service.

    7. Run Get-Queue again to make sure that the queues and mail flow are working as expected.

    Here are also some suggestions for you to check some settings that might cause the large mail.queue file: [RESOLVED] Exchange 2013/2016 hub transport Mail.que file large in size

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.

    Additionally, you can change the location of the queue database by modifying some values in the configuration file locating in %ExchangeInstallPath%Bin\EdgeTransport.exe.config. For more details: Change the location of the queue database

    Regards,

    Lydia Zhou


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    • Proposed as answer by Udara Kaushalya Wednesday, November 13, 2019 4:16 AM
    Tuesday, November 12, 2019 6:01 AM
    Moderator
  • Just checking in to see if above information was helpful. If you have any questions or need further help on this issue, please feel free to post back. 

    Regards,

    Lydia Zhou


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Thursday, November 14, 2019 1:10 AM
    Moderator
  • one more question.  Here is my current setting for the queue which is default and Exchange was installed on C:.

    <add key="QueueDatabasePath" value = "%ExchangeInstallDir%TransportRoles\data\Queue" />
          <add key="QueueDatabaseLoggingPath" value = "%ExchangeInstallDir%TransportRoles\data\Queue" />

    I'd like to put it on D:.  Should I stop Transport service, modify the config file then start service?  Or modify the file then restart Transport service?

    Also, do this config file get override when applying Exchange update such as CU or SP?

    Thanks,

    Thursday, November 14, 2019 11:50 PM
  • As is mentioned in Change the location of the queue database, if you want to create a new queue database and transaction logs in a new location, you have to modify the config file and restart the Exchange Transport service; if you move the existing queue database and transaction logs, you have to modify config file, stop the service to move files and start Exchange Transport service.

    Modification made in Exchange XML application configuration files will be overwritten when you install an Exchange CU. After you install the Exchange CU, you need to re-configure these settings.

    Regards,

    Lydia Zhou


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Sunday, November 17, 2019 4:47 PM
    Moderator
  • It's great that the reply above is useful. Here is a brief summary about this thread.

    Request

    ========================================

    On one of my Exchange 2016 on-premise sever it has a large mail.que (~58 GB) under C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Queue. 

    The last modified date is 8/9/2019 9:31 AM.  Can I delete it safely? I do use lagged copies but not sure if it has anything to do with it.

    Or can I move it to another volume? It's taking too much space on C.

    Solution Summary

    ========================================

    1. You can rebuild the mail.que to get a smaller mail.que.

    2. If you want to create a new queue database and transaction logs in a new location, you have to modify the config file and restart the Exchange Transport service.

    If you move the existing queue database and transaction logs, you have to modify config file, stop the service to move files and start Exchange Transport service.

    3. Modification made in Exchange XML application configuration files will be overwritten when you install an Exchange CU. After you install the Exchange CU, you need to re-configure these settings.

    Reference Links

    ========================================

    [RESOLVED] Exchange 2013/2016 hub transport Mail.que file large in size

    Change the location of the queue database

    Regards, 

    Lydia Zhou


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Wednesday, November 20, 2019 1:31 AM
    Moderator