Migrating an Archive Server (ASM) archive to MailStore

If you’ve used Achab’s Archive Server (ASM) software in the past and upgraded to MailStore, it’s highly likely you’ll be wanting to bring across that historic archived data to the new platform. There are two ways you can go about importing an external ASM archive to MailStore – either directly as files, or, via your MDaemon email server.

One of the limitations of importing directly into MailStore is that mail can’t be sorted on a per-user basis and instead the archive will have to reside under a single MailStore user account which you delegate access to via MailStore’s permissions system. It’s for this reason that we tend to recommend the second option and utilise the MDaemon server as an intermediary for MailStore to collect the old archive data from.

In this article I’ll walk you though how this process can be automated by using a custom batch file to help split the potentially very large ASM archive into yearly archives that can be imported separately into MailStore…

Overview

Before we begin importing any email, lets look at how ASM stores the archived messages.

ASM keeps a copy of all archived messages as a large collection of .msg files within its repository folder structure where each represents a single archived email message. To help manage this collection of messages, the repository is sub-divided into folders for years, months, days and hours. As you can imagine, a typical archive of several years can create a nested folder structure of many hundreds of sub folders with hundreds of thousands of messages.

If we imported these messages directly into MailStore using the file import method we will keep this folder structure but we wouldn’t get that seamless merge of the old and new data that we’re ideally after.

If we use our MDaemon mail server and create a temporary “journalling” mailbox, we can store these messages and configure MailStore to collect them as it would for all other journalled email.To do this we must first flatten the ASM folder structure so all of the message files are within a single folder MDaemon will then see as a mailbox.

For a large ASM archive it’s best to deal with a manageable number of messages at a time so I’d recommend creating a simple set of yearly folders each containing the messages for that period.

ASM can be configured to store these messages in an encrypted format so to copy them you’ll need to use the dedicated copyfiles.exe tool. This is designed to copy files to one destination folder at a time, so to maintain the yearly folders as I described, I’ve written a simple batch file to step through each year’s worth of mail automatically.

The copyfiles.exe and my batch script is available for download here…

ASM_to_Mailstore.zip.

How to run the Batch File

Unzip the contents of the above file to the drive where you have the space to create a temporary copy of the archive (ideally the “Export” folder).

To run, double-click on export.bat

Step 1 You will be asked for the start and end years that you wish to export. Here you can adjust the range of years to cater for limited space if needed.

(Note: if you are unsure how many years back your ASM archive goes have a look in the ASM repository folder path, as this will list all of the yearly folders that have been archived – typically you’ll find this at  c:\program files\ASM\repository)

Step 2 You’ll next be asked for the path of the existing ASM repository which on a default installation will be “c:\program files\ASM\repository”. Enter this in full.

Step 3 You will now be asked if you used a password to encrypt the data within ASM. Choose yes and enter the password or choose no if you didn’t set one.

Step 4 Next you’ll need to enter a path where you wish the exported folder structure to be created e.g “d:\export”.

Step 5 Check the details entered are correct before confirming.

The copy process may take several hours for a large ASM archive so you may wish to leave it running overnight.

Once that’s finished you should see a ‘flattened’ set of yearly folders within the export folder that you can easily import into MailStore by using your MDaemon server one year at a time.

How to import the archive into MailStore using MDaemon

Before we can create a Mailstore archive job we must create a dedicated journal mailbox within MDaemon to serve out the yearly folders full of email that we’ve just created.

Step 1 Within MDaemon, create a new mailbox called asm_mailstore, and assign it a strong password.

Step 2 Under the ‘Folder, Attachments, Groups’ tab, point the mailbox folder to the first year in your Export folder.

Step 3 Within MailStore create a new MDaemon ‘Multidrop Mailbox’ job

Choose the ‘POP3’ protocol and point the host value to your MDaemon server using the account details ‘asm_mailstore’ and the relevant password.

Be sure to edit the ‘received’ target folder to match your current Mailstore users folders. Typically this will be ‘inbox’ ( in lower case).

Click next to save and run the job. You should now be archiving the first year of archived email.

Once complete, simply edit the mailbox folder path within MDaemon to point to the next year and re-run the Mailstore job for each year in your archive. Once you’ve managed to  pull all of that data in, MailStore will automatically delete the messages in the yearly folders.

I hope you’ve found that useful – we don’t actually perform this for you but we are more than happy to provide advice and guidance to customers with current licences if you get stuck so feel free to get in touch if we’re needed.



Share via
Copy link
Powered by Social Snap