Exchange 2007 contains a few nice tools. One of them is the queue viewer_,_ with this tool you can get an overview of all mails who are still in the queue of Exchange 2007. You can do this also via the Powershell command get-queue, with this command all mail queues are displayed with the ammount of messages in it.

Get-Queue -Filter {MessageCount -gt 100} #gives an overview of mailqueues with more then 100 messages  in it.

Get-Queue -Identity Server1\test.local #gives an overview of all mailqueues on server1.

You may want to stop a queue temporarily, this can be done with the command suspend-queue. With this command we can prevent delivery of mails to the mailbox server or the internet.

Suspend-Queue -Filter {NextHopDomain -eq '' -and Status -eq 'retry'}

The command above will pauze all messages to the domain with the status retry in the queue.

Of course we are also able to enable the mailqueue again, this is done with the command resume-queue.

Resume-Queue -Server ex01.test.local -Filter {NextHopDomain -eq ''}

With the command above we will unpause all mails in the queue who need to be delivered to the domain


Johan Veldhuis