How to remove undeliverable message from queue?
For the past week, I am getting a daily error about a certain message that is not able to be delivered. Here is the message:
MSExchangeTransport 8010 2012/08/09 04:17:40 PM 50
Event Details:
A message with the internal message ID 76894 was rejected by the remote server. This message will be deferred and retried because it was marked for retry if rejected. Other messages may also have encountered this error.
How do I delete this message from the out-going queue, as it obviously will never be successfully delivered?Grant Ward, a.k.a. Bigteddy
August 10th, 2012 12:40pm
Open EMC, toolbox, queue viewer, its as simple as highlighting the message and remove.
Remove Messages from Queues
http://technet.microsoft.com/en-us/library/bb123535.aspxJames Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
August 10th, 2012 12:59pm
How about the powershell cmdlet?
Remove-Message -Filter {Subject -eq "subject"} -WithNDR $falseRegards from www.windowsadmin.info | www.blog.windowsadmin.info
August 10th, 2012 1:09pm
Open EMC, toolbox, queue viewer, its as simple as highlighting the message and remove.
Remove Messages from Queues
http://technet.microsoft.com/en-us/library/bb123535.aspx
James Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com
The strange thing is that the message queue is empty!Grant Ward, a.k.a. Bigteddy
Free Windows Admin Tool Kit Click here and download it now
August 10th, 2012 2:01pm
How about the powershell cmdlet?
Remove-Message -Filter {Subject -eq "subject"} -WithNDR $false
Regards from www.windowsadmin.info | www.blog.windowsadmin.info
I like Powershell (the Powershell forums are where I "live"). But all I've got is the internal message ID 76894. I don't know the subject. Can I remove by message ID?
PS: I don't know if this message is bogus, because as I said in my other reply, the GUI Message Queue is empty. Yet the error message is repeated about 80-90 times per day.Grant Ward, a.k.a. Bigteddy
August 10th, 2012 2:04pm
Please see the original link i sent, "you cannot delete a message from a submission queue"
Remove Messages from Queues
http://technet.microsoft.com/en-us/library/bb123535.aspx
James Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
August 10th, 2012 2:47pm
I'm sorry, I didn't mention I'm using Exchange 2007. The link you provided refers to 2010, and this is what I see:
Grant Ward, a.k.a. Bigteddy
August 10th, 2012 3:41pm
Can you message track it and see if it eventually got delivered?
Get-ExchangeServer | where {$_.isHubTransportServer -eq $true -or $_.isMailboxServer -eq $true}
| Get-MessageTrackingLog -internalMessageId "76894" | Select-Object Timestamp,ServerHostname,ClientHostname,Source,EventId,Recipients | Sort-Object -Property Timestamp
Also run below does it output any messages?
get-message | where {$_.status -eq Retry}
What version of Exchange 2007 SP and rollup?
James Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
August 10th, 2012 3:53pm
Yes, that returns the following:
Timestamp : 2012/08/02 08:14:44 PM
ServerHostname : SERVER1
ClientHostname :
Source : AGENT
EventId : RECEIVE
Recipients : {Archiver@mydomain.com}
Timestamp : 2012/08/09 04:29:16 PM
ServerHostname :
ClientHostname : SERVER1
Source : STOREDRIVER
EventId : FAIL
Recipients : {Archiver@mydomain.com}
Timestamp : 2012/08/09 04:29:16 PM
ServerHostname : SERVER1
ClientHostname :
Source : DSN
EventId : BADMAIL
Recipients : {}
(Archiver is the archive mailbox, which feeds into GFI MailArchiver)Grant Ward, a.k.a. Bigteddy
August 10th, 2012 4:12pm
The command:
get-message | where {$_.status -eq Retry}
...returns nothing.
Running SP3, no update rollup. (Update rollup 6 is available in my WSUS, but I haven't deployed it yet.)Grant Ward, a.k.a. Bigteddy
Free Windows Admin Tool Kit Click here and download it now
August 10th, 2012 4:17pm
Thanks for your help so far. I don't know how to interpret the results of the query above. (Exchange is not my strong point).
But it's bed-time for me, so don't think me rude if I don't reply for a while...Grant Ward, a.k.a. Bigteddy
August 10th, 2012 5:14pm
Check if the message is in the pickup directory and delete it.
C:\Program Files\Microsoft\Exchange Server\V14\TransportRoles\PickUp
Badmail A message classified as badmail has serious problems that prevent the Pickup directory from submitting the message for delivery. The other condition that causes badmail is when the message is formatted correctly, but the recipients aren't
valid, and an NDR message can't be sent to the sender because the sender isn't valid.
Message files determined to be badmail are left in the Pickup directory and are renamed from <filename>.eml to <filename>.bad. If the <filename>.bad file already exists, the file is renamed to <filename><datetime>.bad. If badmail
exists in the Pickup directory, an event log error is generated, but the same badmail messages don't generate repeated event log errors.James Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
August 10th, 2012 5:54pm
Check if the message is in the pickup directory and delete it.
C:\Program Files\Microsoft\Exchange Server\V14\TransportRoles\PickUp
Badmail A message classified as badmail has serious problems that prevent the Pickup directory from submitting the message for delivery. The other condition that causes badmail is when the message is formatted correctly, but the recipients aren't
valid, and an NDR message can't be sent to the sender because the sender isn't valid.
Message files determined to be badmail are left in the Pickup directory and are renamed from <filename>.eml to <filename>.bad. If the <filename>.bad file already exists, the file is renamed to <filename><datetime>.bad. If badmail
exists in the Pickup directory, an event log error is generated, but the same badmail messages don't generate repeated event log errors.James Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com
August 10th, 2012 6:03pm
Well, strangely the error didn't appear today, so I'm going to mark this as resolved. Thanks again for all your input. I really appreciate the help.Grant Ward, a.k.a. Bigteddy
Free Windows Admin Tool Kit Click here and download it now
August 11th, 2012 2:30am