SOLVED

Exchange On-Premise mail queue export

%3CLINGO-SUB%20id%3D%22lingo-sub-1952322%22%20slang%3D%22en-US%22%3EExchange%20On-Premise%20mail%20queue%20export%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1952322%22%20slang%3D%22en-US%22%3E%3CP%3EHey%20guys%2C%3C%2FP%3E%3CP%3EI%20got%20an%20interesting%20question%20in%20a%20hard%20case.%26nbsp%3B%20We%20are%20just%20helping%20a%20customer%20who%20had%20a%20cyber%20security%20incident%20some%20months%20ago.%20In%20the%20time%20where%20the%20Exchange%20servers%20have%20not%20been%20accessible%20all%20emails%20have%20been%20queued%20by%20an%20external%20service%20provider.%3CBR%20%2F%3EAfterwards%20the%20email%20traffic%20had%20been%20opened%20so%20that%20the%20Exchange%20Edge%20servers%20could%20distribute%20the%20emails%20again.%20But%20unfortunately%20two%20frontends%20in%20different%20locations%20were%20not%20up%20and%20running.%20So%20a%20big%20bunch%20of%20emails%20have%20not%20been%20provided%20and%20purged%20after%20the%20default%20period%20of%202%20days.%20During%20the%20stressed%20situation%20it%20looked%20like%20the%20customer%20is%20willing%20to%20disclaim%20these%20emails.%3CBR%20%2F%3EBut%20now%20the%20emails%20shall%20be%20restored.%3CBR%20%2F%3E%3CBR%20%2F%3EMy%20idea%20was%20to%20restore%20the%20Edge%20Server%20from%20a%20specific%20date%20from%20the%20backup%20in%20an%20isolated%20VLAN.%20This%20worked%20so%20far%2C%20but%20we%20are%20not%20able%20to%20time%20travel%2C%20so%20by%20starting%20the%20services%20all%20emails%20get%20purged%20immediately.%3CBR%20%2F%3ESo%20I%20started%20the%20machine%20sin%20safe%20mode%2C%20renamed%20the%20mail.que%20and%20restarted%20the%20machine.%20All%20services%20came%20up%20besides%20from%20the%20transport%20service.%20Interestingly%20I%20am%20able%20execute%20Set-TransportService%20-MessageExpirationTimeout%20anyway.%20Unfortunately%20the%20max%20range%20is%2090%20days%20and%20soon%20I%20would%20need%20to%20set%20it%20to%20180%20days.%3CBR%20%2F%3E%3CBR%20%2F%3EHave%20you%20got%20any%20other%20ideas%3F%3CBR%20%2F%3EIs%20there%20a%20possibility%20to%20export%20messages%20directly%20from%20the%20mail.que%20file%3F%3CBR%20%2F%3E%3CBR%20%2F%3EI%20already%20thought%20about%20(virtual)%20time%20travel%20regarding%20time%20manipulation%20of%20the%20VM%2C%20but%20this%20is%20only%20possible%20if%20you%20sync%20the%20time%20from%20the%20host.%20As%20there%20are%20several%20hundred%20other%20VMs%2C%20we%20would%20have%20to%20create%20a%20new%20host%20with%20no%20further%20machines%20on%20it.%3CBR%20%2F%3E%3CBR%20%2F%3EI'm%20looking%20forward%20to%20talk%20about%20your%20ideas.%3CBR%20%2F%3E%3CBR%20%2F%3EKind%20regards%2C%3CBR%20%2F%3Ewoelki%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1952322%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3E2010%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExchange%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1952402%22%20slang%3D%22en-US%22%3ERe%3A%20Exchange%20On-Premise%20mail%20queue%20export%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1952402%22%20slang%3D%22en-US%22%3E%3CP%3EAre%20you%20sure%20you%20need%20to%20export%20the%20queue%20%3F%20if%20the%20relevant%20messages%20were%20sent%20from%20mailboxes%2C%20you%20could%20do%20a%20content%20search%20instead.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Frequent Contributor

Hey guys,

I got an interesting question in a hard case.  We are just helping a customer who had a cyber security incident some months ago. In the time where the Exchange servers have not been accessible all emails have been queued by an external service provider.
Afterwards the email traffic had been opened so that the Exchange Edge servers could distribute the emails again. But unfortunately two frontends in different locations were not up and running. So a big bunch of emails have not been provided and purged after the default period of 2 days. During the stressed situation it looked like the customer is willing to disclaim these emails.
But now the emails shall be restored.

My idea was to restore the Edge Server from a specific date from the backup in an isolated VLAN. This worked so far, but we are not able to time travel, so by starting the services all emails get purged immediately.
So I started the machine sin safe mode, renamed the mail.que and restarted the machine. All services came up besides from the transport service. Interestingly I am able execute Set-TransportService -MessageExpirationTimeout anyway. Unfortunately the max range is 90 days and soon I would need to set it to 180 days.

Have you got any other ideas?
Is there a possibility to export messages directly from the mail.que file?

I already thought about (virtual) time travel regarding time manipulation of the VM, but this is only possible if you sync the time from the host. As there are several hundred other VMs, we would have to create a new host with no further machines on it.

I'm looking forward to talk about your ideas.

Kind regards,
woelki

4 Replies

Are you sure you need to export the queue ? if the relevant messages were sent from mailboxes, you could do a content search instead.

@RNalivaikayes, I'm sure, because the mails came from the internet.

Ah, yes I had misread your question.. i would suggest contacting microsoft premier support for that..

best response confirmed by woelki (Frequent Contributor)
Solution

At least I could figure it out myself. It was a combination of VMware and disabling all NTP services. I have disabled the EXSI time sync for the single machines. In Windows safe mode I was able to disable all NTP possibilities and rename the mail.que

This is marked as faulty move, but this is not important for the operation. After starting Windows in regular mode the transport service did not come up, what is great for our purpose. And the most important thing here is, although the transport service is not up and running in this situation you are allowed to execute changes with Set-TransportService.
So I executed...

 

Set-TransportService -Identity Edge01 -MessageExpirationTimeout 90.00:00:00

 


... renamed the backup.que back to mail.que and started the transport service. As the server now believed in time travel, no messages have been purged.

For erveryone who reads this and wants to know how to export messages...

Export messages from queues