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
thanx a lot for this tip
ReplyDeletei was looking for this solution long time ago
this helped me to resolve my problem
http://support.microsoft.com/kb/2394554
ReplyDeleteI couldnt figure this out for a month! Thanks a million!!!
ReplyDeleteThanks!
ReplyDeleteHelped me solve a couple of messages stuck for a long time. Finally getting rid of those in the eventlog.
I have had a message sitting in my submission queue for a month because every other article I read said "Oh no, you cannot remove a message from the submission queue". Then I stumble across this article and POOF. It's gone. Thank you so very much!
ReplyDeleteGood tip, thanks!
ReplyDeleteI lost this command and it took me an hour to find your blog again, I havent seen a single other source for this command. My concern wasnt just a few annoying messages stuck in the queue, but 1000s to the point that I had failing backups and serious performance issues. After running your little cleanup command, everything appears to be in order again!
ReplyDeleteI am happy to know that it helped
DeleteThis comment has been removed by the author.
ReplyDeleteWorked wonderfully - thank you!
ReplyDeletePerfect, thanks.
ReplyDeleteTried this great tip when confronting the same problem within my Exchange 2010 but messages wont delete and the following lines appeared within the shell when submitting your command:
ReplyDeleteThe object with identity servername\Submission\2485397 wasn´t found.
+CategoryInfo : InvalidOperation: (:) [Remove-Message], LocalizedException
+FullyQualifiedErrorId : 8A9C83DE,Microsoft.Exchange.Management.QueueViewerTasks.RemoveMessage
Dozens of this messages appeared, one after the other, in red. The only difference between them are the numbers after \Submission\XXXXXX and the Hexadecimal? code below
Any hint mates?
Thank you very much!
Will you try to run this from the Hub Transport server and post the full error with the command? also please check the event log at the same time when you execute the command, please post any errors there as well. If nothing helps the last fix would be to ensure that you HT has no useful or actual emails in the queue and do the following:
Delete> Stop Microsoft Exchange Transport Service
> Rename the current "Queue" folder under “C:\Program Files\Microsoft\Exchange Server\Transport Roles\data\” to “Queue_Old” and created a new “Queue” Folder
> Start Microsoft Exchange Transport Service
> Check the "Queue" folder under “C:\Program Files\Microsoft\Exchange Server\Transport Roles\data\” location to see if new mail.que database is created
just be careful about this and make sure that you check the email flow is normal after the above steps.
Thank you so much for putting this up saved me.
ReplyDeleteThank you this saved my life!
ReplyDelete