While checking the message queue on a hub transport server I found many messages stuck with status retry and last error read something like the following
400 4.4.7 The server responded with: 550 5.6.0 CAT.InvalidContent.Exception: InvalidCharsetException, Character set name (ISO-8859-6-i) is invalid or not installed.; cannot handle content of message with InternalId….
I always like to have the mail queue clear and specially submission (local deliveries), which can be a nightmare if clogged.
Resolution
by looking at the details of these messages one could tell that they are either spam of Exchange server cannot process it because the FromAddress field is <> empty.
to get rid of these messages from the queue, I just used the following cmdlet.
Get-Message -Filter {FromAddress -eq "<>"} -Server htserver | Remove-Message