Delete message queues for a specific hop domain
Some servers, especially in cases of careless protection, are easily used as relay servers for spam, often causing queue congestion
Others are due to bounce, and some messages that do not deliver reports will be blocked in the queue. If you need to delete these spam messages, you can use the following command to specify the domain name for queue deletion.
Get-TransportServer | Get-Queue-Filter {NextHopDomain-eq "Contoso.com"} | Remove-Message-WithNDR $False