We often encounter situations where messages in the transmission queue need to be replayed, and here's a brief description of how to do it:
Exchangetransferring messages is the first message that the application will need to send in a format conversion toemlformat of the text file, and thenPickup(sortingprogram) will. emlfiles are placed inC:\Program Files\Microsoft\Exchange Server\v15\transportroles\pickupdirectory, and thenSMTPThe inbound server submits the message to the channelSMTPTransport in the service database. Need to be awareemlThe file must meet the following requirements:
1 Span lang= "ZH-CN" xml:lang= "ZH-CN"), only the extension name is .eml pickup Span lang= "ZH-CN" xml:lang= "ZH-CN" > program processing.
2 Span lang= "ZH-CN" xml:lang= "ZH-CN"), eml to,cc,bcc smtp address format. (That is, the recipient address or CC address must be the correct smtp Address)
3 ), eml in the file from or Sender column must have a SMTP address.
4 ), corresponding clear text messages, and there must be spaces between the body and the message header. (MIME -encrypted messages do not have this requirement)
5 Span lang= "ZH-CN" xml:lang= "ZH-CN"), eml 64kb 100 man.
generally by order Assemblemessage of the exported eml The format is all in accordance with the requirements. The following is the SMTP Server work process for Exchange.
650) this.width=650; "height=" 332 "title=" clip_image001 "style=" margin:0px;border:0px;padding-top:0px; Padding-right:0px;padding-left:0px;background-image:none, "alt=" clip_image001 "src=" http://s3.51cto.com/wyfs02/ M01/86/e6/wkiom1fowzaj-s4eaadfloxjy6y369.gif "border=" 0 "/>
described below Exchange 2013/2016 How to replay a queue action method.
1 , and obtain specific queue information by command.
get-queue-filter {MESSAGECOUNT-GT} Gets the queue with the number of messages greater than ten .
650) this.width=650; "height=" 203 "title=" clip_image002 "style=" margin:0px;border:0px;padding-top:0px; Padding-right:0px;padding-left:0px;background-image:none, "alt=" clip_image002 "src=" http://s3.51cto.com/wyfs02/ M00/86/e5/wkiol1fowzfjyibbaafpcvfbrsq311.png "border=" 0 "/>
2 , using commands will require the operation queue to be shelved. (To export queue data, you must set the status of messages in all transmissions in that queue to shelved.) Otherwise you will receive the following error message)
G et-message-queue cldb02\7 | suspend-message -confirm: $False
650) this.width=650; "height=" 121 "title=" clip_image003 "style=" border:0px;padding-top:0px;padding-right:0px; Padding-left:0px;background-image:none, "alt=" clip_image003 "src=" http://s3.51cto.com/wyfs02/M01/86/E5/ Wkiol1fowznj541haafpth3hz3e836.png "border=" 0 "/>
3 eml format
[Email protected] (Get-message-queue clldb02\7)
$theMessages | foreach {$i + +; Export-message $_. Identity | Assemblemessage–path ("c:\3\" + $i + ". eml")}
command: a ssemblemessage is required and must have this command to convert and filter the exported file binary stream.
4 , copy the exported. eml file to the Pickup directory (get the Pickup directory location by command: get-transportservice-identity clmaildb01 | fl name,*pickup*, Check the directory location of the Pickupdirectorypath for message queue replay, for example: C:\Program files\microsoft\exchange server\v15\transportroles\pickup.
For information about exporting message queue data, refer to: https://technet.microsoft.com/en-us/library/aa998625 (v=exchg.160). aspx
To export a domain mail queue message on a server:
Get-message-queue "server1\contoso.com"-resultsize Unlimited | Foreach-object {suspend-message $_. Identity-confirm: $False; $Temp = "C:\ExportFolder\" +$_. Internetmessageid+ ". eml"; $Temp = $Temp. Replace ("<", "_"); $Temp = $Temp. Replace (">", "_"); Export-message $_. Identity | Assemblemessage-path $Temp}
To export all message queues on a server:
Get-message-filter {<messagefilter>} [-server <serveridentity>]-resultsize Unlimited | Foreach-object {$Temp =<path>+$_. Internetmessageid+ ". eml"; $Temp = $Temp. Replace ("<", "_"); $Temp = $Temp. Replace (">", "_"); Export-message $_. Identity | Assemblemessage-path $Temp}
This article is from the "Jialt blog" blog, make sure to keep this source http://jialt.blog.51cto.com/4660749/1846818
Exchange 2013/2016 Message Queue Replay operations