Unable to delete messages from queue.
I have a journaling rule setup to send mail to a archive appliance. I have two messages in my queue that are From Address:<> to my recipient (my archiver's email address). The journal rule works fine since it is working for all my users mail, but I have two messages stuck in my queue complaining that they could not be categorized and an event 9213 for MSExchangeTransport every 30 minutes.
"A non-expirable message with the internal message ID 7996 could not be categorized. This message may be a journal report or other system message. The message will remain in the queue until administrative action is taken to resolve the error. Other messages may also have encountered this error. To further diagnose the error, use the Queue Viewer or the Mail Flow Troubleshooter."
I have tried via the GUI and Shell to remove these two messages. The GUI gives me an error:
--------------------------------------------------------Microsoft Exchange Error--------------------------------------------------------Action 'Remove (with NDR)' could not be performed on object 'RE: Test to determine if email can be delivered & Received'.
RE: Test to determine if email can be delivered & ReceivedFailedError:The requested operation can't be performed for the object with identity MyMailServerName\Submission\7999.
--------------------------------------------------------OK--------------------------------------------------------
The Shell will actually not report back an error but I still have those messages in the queue. The command to see info about the message was:
Get-Message -IncludeRecipientInfo | Where { $_.Recipients -Like "*archive@archivemailaddress.com*" } | Format-List
Then I tried deleting the message using the "InternetMessageID" info I gathered from this.
Remove-Message -Filter {InternetMessageID -eq "b0ec6ae0-566b-4bde-8565-e87d969c8516@journal.report.generator"} -WithNDR $false
This prompts me for a Yes, No, etc... responce (I thought I had it this time) and gave me no error, but the message still resides in queue.I am at a loss. Any help?
September 24th, 2008 7:06pm
Clarify: Two messages stuck in the queue, and unable to remove
Collect info:
1. Please describe your environment
2. Is the issue persisted currently or only for those two messages?
Troubleshooting:
1. Please view this page and take the suggested actions in it, and also post output of the actions
2. Please try the cmdlet <Remove-Message -Filter {FromAddress -eq "sender@domain.com"} -withNDR $false debug -verbose>, it will offer more detailed process of the execution
Free Windows Admin Tool Kit Click here and download it now
September 26th, 2008 8:36am
Correct, two messages stuck in queue and cannot remove.
Environment is a Windows 2003 R2 w/ SP2 64bitserver, Exchange 2007 SP1 with all roles, AD/DNS is also Windows 2003 R2 w/ SP2 64bit.
This just seemed to start happening a few days ago and just with these two particular messages. I have a archive appliance from ArcMail and a journal rule setup in Exchange to journal all mail to the ArcMail appliance. This has been working and continues to work except for these two messages.
___________________________________________________________________________________________________
[PS] C:\>Get-Message -IncludeRecipientInfo | Where { $_.Recipients -Like "*archiver@mailarchive.lcsd.local*" } | Format-List
Identity : CO-MAIL1\Submission\7996Subject : RE: Test to determine if email can be delivered & ReceivedInternetMessageId : <b0ec6ae0-566b-4bde-8565-e87d969c8516@journal.report.generator>FromAddress : <>Status : RetrySize : 29638BMessageSourceName : JournalingSourceIP : 255.255.255.255SCL : 0DateReceived : 9/18/2008 1:39:34 PMExpirationTime :LastError : Categorization failed. The message will be deferred and ret ried because it was marked for retry if rejected.RetryCount : 0Queue : CO-MAIL1\SubmissionRecipients : {archiver@mailarchive.lcsd.local}IsValid : TrueObjectState : Unchanged
Identity : CO-MAIL1\Submission\7999Subject : RE: Test to determine if email can be delivered & ReceivedInternetMessageId : <b5aad999-9497-4730-85d7-f4cb13711146@journal.report.generator>FromAddress : <>Status : RetrySize : 29623BMessageSourceName : JournalingSourceIP : 255.255.255.255SCL : 0DateReceived : 9/18/2008 1:39:34 PMExpirationTime :LastError : Categorization failed. The message will be deferred and ret ried because it was marked for retry if rejected.RetryCount : 0Queue : CO-MAIL1\SubmissionRecipients : {archiver@mailarchive.lcsd.local}IsValid : TrueObjectState : Unchanged___________________________________________________________________________________________________
Domain Controller Diagnosis
Performing initial setup: Done gathering initial info.
Doing initial required tests
Testing server: co-site\CO-DNS1 Starting test: Connectivity ......................... CO-DNS1 passed test Connectivity
Doing primary tests
Testing server: co-site\CO-DNS1 Starting test: Replications ......................... CO-DNS1 passed test Replications Starting test: NCSecDesc ......................... CO-DNS1 passed test NCSecDesc Starting test: NetLogons ......................... CO-DNS1 passed test NetLogons Starting test: Advertising ......................... CO-DNS1 passed test Advertising Starting test: KnowsOfRoleHolders ......................... CO-DNS1 passed test KnowsOfRoleHolders Starting test: RidManager ......................... CO-DNS1 passed test RidManager Starting test: MachineAccount ......................... CO-DNS1 passed test MachineAccount Starting test: Services ......................... CO-DNS1 passed test Services Starting test: ObjectsReplicated ......................... CO-DNS1 passed test ObjectsReplicated Starting test: frssysvol ......................... CO-DNS1 passed test frssysvol Starting test: frsevent ......................... CO-DNS1 passed test frsevent Starting test: kccevent ......................... CO-DNS1 passed test kccevent Starting test: systemlog ......................... CO-DNS1 passed test systemlog Starting test: VerifyReferences ......................... CO-DNS1 passed test VerifyReferences
Running partition tests on : ForestDnsZones Starting test: CrossRefValidation ......................... ForestDnsZones passed test CrossRefValidation
Starting test: CheckSDRefDom ......................... ForestDnsZones passed test CheckSDRefDom
Running partition tests on : DomainDnsZones Starting test: CrossRefValidation ......................... DomainDnsZones passed test CrossRefValidation
Starting test: CheckSDRefDom ......................... DomainDnsZones passed test CheckSDRefDom
Running partition tests on : Schema Starting test: CrossRefValidation ......................... Schema passed test CrossRefValidation Starting test: CheckSDRefDom ......................... Schema passed test CheckSDRefDom
Running partition tests on : Configuration Starting test: CrossRefValidation ......................... Configuration passed test CrossRefValidation Starting test: CheckSDRefDom ......................... Configuration passed test CheckSDRefDom
Running partition tests on : lcsd Starting test: CrossRefValidation ......................... lcsd passed test CrossRefValidation Starting test: CheckSDRefDom ......................... lcsd passed test CheckSDRefDom
Running enterprise tests on : lcsd.local Starting test: Intersite ......................... lcsd.local passed test Intersite Starting test: FsmoCheck ......................... lcsd.local passed test FsmoCheck
___________________________________________________________________________________________________
[PS] C:\>Remove-Message -filter {FromAddress -eq "<>"} -withNDR $false -debug -verboseVERBOSE: Remove-Message : Beginning processing.
ConfirmAre you sure you want to perform this action?Removing the messages that match filter "FromAddress -eq "<>"". Yes Yes to All No [L] No to All Suspend [?] Help(default is "Y"):YVERBOSE: Remove-Message : Ending processing.
[PS] C:\>Remove-Message -Filter {InternetMessageID -eq "b0ec6ae0-566b-4bde-8565-e87d969c8516@journal.report.generator"} -WithNDR $false -debug -verboseVERBOSE: Remove-Message : Beginning processing.
ConfirmAre you sure you want to perform this action?Removing the messages that match filter "InternetMessageID -eq"b0ec6ae0-566b-4bde-8565-e87d969c8516@journal.report.generator"". Yes Yes to All No [L] No to All Suspend [?] Help(default is "Y"):YVERBOSE: Remove-Message : Ending processing.
[PS] C:\>Remove-Message -filter {FromAddress -eq ""} -withNDR $false -debug -verboseVERBOSE: Remove-Message : Beginning processing.
ConfirmAre you sure you want to perform this action?Removing the messages that match filter "FromAddress -eq """. Yes Yes to All No [L] No to All Suspend [?] Help(default is "Y"):YVERBOSE: Remove-Message : Ending processing.[PS] C:\>
___________________________________________________________________________________________________
Tried several filter options and all had the same result. No events in the event viewer and did not remove the stuck messages.
September 26th, 2008 4:36pm
Per my research, we dont have option to remove these messages from submission queue. One alternative option to get rid of these messages is, mounting a fresh queue database
[Please do it in unproductive time]
a. Check and ensure that no messages are present in queue
b. Stop Microsoft Exchange Transport Service
c. Rename the current "Queue" folder under C:\Program Files\Microsoft\Exchange Server\Transport Roles\data\ to Queue_Old and created a new Queue Folder
d. Start Microsoft Exchange Transport Service
e. Check the "Queue" folder under C:\Program Files\Microsoft\Exchange Server\Transport Roles\data\ location to see if new mail.que database is created
f. Confirm mailflow
Resources:
Working with the Queue Database on Transport Servers
Managing the Queue Database
Free Windows Admin Tool Kit Click here and download it now
September 29th, 2008 5:21am
Ok... I'll try it this coming weekend and post back to let you know.
Thanks.
September 29th, 2008 5:19pm
Upon initial setup of this server, I had followed the procedure for moving the Queue DB and log files to a different path (log files on my log lun and db on my db lun). Will I have to rename both directories? And your saying that having nothing in the "new directory" will automatically create clean queue files after I restart the transport server?
Free Windows Admin Tool Kit Click here and download it now
September 29th, 2008 11:59pm
Yes, you need to rename the old folder to generate a new one
Please review Creating a new queue database section of this article
Summary of relocating the queue path
September 30th, 2008 4:43am
That did the trick. I stopped the transport service, renamed both my queue directories (log and DB), recreated the directories and made sure the security was set the same as what the old directories were. Started the transport service back, and like you stated, it created the appropriate files and I then tested passing messages to inside and outside (to and fro) and everything worked great and no more stuck messages in queue.
Thanks a bunch.
Free Windows Admin Tool Kit Click here and download it now
October 4th, 2008 11:32pm
Glad you solved it
October 6th, 2008 4:03am
Hi Tankster,
I am trying to reproduce the issue you were experiencing. Could you please tell me how do you create those 2 messages which can be queued in the submission queue?
Thanks in advance for your help
Free Windows Admin Tool Kit Click here and download it now
November 12th, 2010 7:41pm
I had this issue recently with an Exchange 2010 SP1 server. I had a message stuck in queue that was intended for Journaling, however it had a content conversion error as the email came from a Blackberry device.
I didnt want to have to rebuild the mail queue for 1 email so I simply removed the message using PowerShell doing the following:
1. Open the Exchange Management Shell
2. Type in Get-Message | fl
3. Make a note of the Identity of the message or messages, for example mine was SERVERNAME\Submission\7841
4. Type in Remove-Message -Identity "SERVERNAME\Submission\7841"
5. When prompted confirm you want to delete the message. The message will now be removed from the queue.
Hope this helps others with this issue as worked great for me.
April 15th, 2011 11:30am
Just wanted to confirm that the 2010 method works. I just did it on my 2010 SP1 server and the messages are cleared. Thanks!!!
Free Windows Admin Tool Kit Click here and download it now
June 21st, 2011 10:24am