Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to delete an exchange message queue

Shulou Source: shulou.com Published: 2022-06-03 08:45:41 09月21日 Update

In the daily exchange mail management process, it is inevitable to encounter spam problems. Sometimes a large number of spam mails cause the mail queue to be full, and the mail is delayed or busy. You can refer to the following methods to handle it. If the sender is a specific address, you can use the following command to clear the queue Take mailbox cg18@demo.com as an example, delete all outgoing mail queues of cg18 users, enter the following command in the exchange command line console, and enter A to select all yes, delete. (Note that running this command will delete all emails that cg18 users are currently sending out, causing normal emails sent out at a certain time to be deleted)

Remove-Message -Server yrmail -Filter {FromAddress -eq'cg18@demo.com'} -withNDR $false where yrmail is the mail server name

To delete messages with a specific subject, use the following command

Get-Message -Queue "yrmail\queue" -ResultSize unlimited |where{$_.Subject -eq "Subject"}| Remove-Message -WithNDR $False

After that, if there is not enough space on disk C, confirm the size of the queue file, and go to the mail system installation directory to view the queue file.

Empty the file as follows

First, stop the transmission service. Note that stopping this server affects mail sending and receiving.

Navigate to the following path C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Find the queue directory and rename the queue folder if queueold

Start the transport service, and a queue folder will be regenerated under this directory

After confirming that the mail is sent and received normally, delete the queuold folder, thus freeing up the C disk space.

Tags: Mail file queue command service folder directory subject can make garbage method server for user space transfer input busy example sender Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB OPPO Reno Xiaomi Redmi Shulou Technology