Tuesday, August 9, 2011

Emails stuck in submissions queue–Exchange 2010 sp1

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

14 comments:

  1. thanx a lot for this tip

    i was looking for this solution long time ago

    this helped me to resolve my problem

    ReplyDelete
  2. http://support.microsoft.com/kb/2394554

    ReplyDelete
  3. I couldnt figure this out for a month! Thanks a million!!!

    ReplyDelete
  4. Thanks!

    Helped me solve a couple of messages stuck for a long time. Finally getting rid of those in the eventlog.

    ReplyDelete
  5. 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!

    ReplyDelete
  6. I 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!

    ReplyDelete
  7. This comment has been removed by the author.

    ReplyDelete
  8. Worked wonderfully - thank you!

    ReplyDelete
  9. Tried 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:

    The 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!

    ReplyDelete
    Replies
    1. 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:

      > 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.

      Delete
  10. Thank you so much for putting this up saved me.

    ReplyDelete

Leave a comment if you find this post useful or if you have any questions