June 7, 2013

Move emails from one Hub server to another Hub server for delivery

Ever found yourself dealing with an Edge server with messages stuck on it, unable to deliver?
There is a quick method to transfer those messages to another Edge server that is functioning properly, in order to take some time troubleshooting the first edge server.
I do not recommend this but this is how it is done when you find yourself in a situation with very little options.

Example, you are on an EDGE server 1 server and messages are stuck in retry and you want to move those messages to EDGE server 2 (or 3 or 4... etc) for processing.

1: On exchange EDGE server 1

get-queue

2: Pause the transport services,

3: Suspend the queue

get-queue | ? {$_.deliverytype -eq 'dnsconnectordelivery'} | get-message | suspend-message

4: Then export those suspended messages:

get-queue | ? {$_.DeliveryType -eq 'dnsconnectordelivery'} | get-message | ForEach-Object {$temp="c:\temp\"+$_.InternetMessageID+".eml";$Temp.Replace("<","_");$Temp=$Temp.Replace(">","_");Export-Message $_.Identity | AssembleMessage -Path $Temp}


5: Remove exchange Edge server 1 from the send connector

6: Open c:\temp folder on exchange Edge server 1

7: Copy all the *.eml files from the c:\temp folder and remote into exchange Edge server 2.

8: Browse to where exchange is installed on the Edge server (this can be c: or d: drive) eg: 
 D:\Program Files\Microsoft\Exchange Server\TransportRoles\Replay and paste all the .eml files copied from c:\temp on exchange EDGE server 1.
Since the transport service is running this queue will quickly flush.

9: Return to exchange Edge server 1 and start the transport services again once you have resolved the technical issue with that Edge server.



No comments:

Post a Comment