If you’ve configured the archiving feature in MDaemon but have since upgraded to MailStore Server, it makes sense to move the historic stuff across so you’ve got a single unified archive store.Let’s have a look at how you go about it…
It is possible to simply pull the archive directly into MailStore but doing it this way means the historic archive data will all then exist under a single user’s account in MailStore which isn’t really ideal.
A better way to bring the archive into MailStore is to have MDaemon serve out its own archive as a journal mailbox for MailStore to collect from. The reason being, this means MailStore will look at each of the messages and assign them to the relevant user’s archives based on the sender/ recipient information in the header.
Before we begin importing any email, let’s look at archive options in MDaemon.
By default, MDaemon is set up to take a copy of both inbound and outbound emails and store them in two separate public folders, ‘inbound’ and ‘outbound’. If you’re doing it this way we can usually skip the ‘preparing the archive’ steps below and set up the journaling mailbox directly to the archive folders (disabling the MDaemon archiving feature first).
However if you’ve tweaked the options on this page to archive based on the recipient and sender mailboxes…
.. then we will first need to copy and flatten the archive to create a single folder for inbound mail and another for outbound email.
Preparing the archive
Before we can set up a journaling job we need to copy all of the archived messages ( *.msg files) into a single folder. To do this we can use the ‘copyfiles’ command to scan through a large folder tree and copy all of the .msg files it finds into a single export folder. Please note we’ll need some free space that’s at least as large as the MDaemon archive.
To make this process easier feel free to use the batch file I’ve created below:-
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 drive letter MDaemon is installed on. Usually this is C: but if this is different on your server, you’ll need to enter the right letter.
Step 2 Next you will need to enter a path where you wish the exported folder structure to be created e.g “d:\export”. ( please note this should be a local drive not a network share)
Step 3 Check the details entered are correct before confirming.
Please note the copy process may take several hours for a large archive so you may wish to leave it running overnight.
Once complete you should have two folders in your export path for ‘Incoming’ and ‘Outgoing’. You can now move onto the final stage to import the messages within these folders into MailStore
How to Import the archive into MailStore using MDaemon
Before we can set up 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 archive_mailstore, and assign it a strong password.
Step 2 Under the ‘Folder, Attachments, Groups’ tab, point the mailbox folder to the ‘Inbound’ folder within your ‘Export’ folder and click ‘OK’ to save the account
Step 3 Within MailStore create a new MDaemon Multidrop mailbox job
Change the Access Via type to ‘POP3‘ and Point it to your MDaemon server using the account details ‘asm_mailstore’ and the relevant password.
Note: it’s important that MailStore receives these emails via POP3 as detailed above and not IMAP so that the original date of the email is recorded in MailStore. If MailStore receives the email via IMAP the date they were exported from ASM by copyfiles will be the date recorded in MailStore and so all emails that were previously held in ASM will have the same date in MailStore.
Be sure to edit the ‘received’ target folder to match your current Mailstore user folders. Typically this will be ‘inbox’ ( in lower case).
Click next to save the and run the job.
You should now be archiving the inbound archived email.
Once complete, simply edit the mailbox folder path within MDaemon to point to the ‘outbound’ folder and re-run the Mailstore job again. Once you have archived each year the messages within the export folder should be deleted by MailStore.
I hope that helps, by all means use the comments section if you’ve still got any questions!
- Support queries shared: MailStore user authentication failing despite correct password (zensoftware.co.uk)
- Meet MailStore – your new best friend (An end user’s guide) (zensoftware.co.uk)