I wrote some scripts to migrate from IPSwitch IMail 2006 (IMail 9) to MDaemon 11.0.3.
Because IMail and MDaemon have some differences in logic, I cut my migration into several parts.
Below you’ll find a step-by-step IMail to MDaemon migration including the scripts I used/wrote!
- Import all Domains in MDaemon
In my case I got all the domains from our finance/asset database and added them to the file: \Mdaemon\App\Domains.dat.
I made a script which help you in querying your database and dynamically create a file which content you can add to the Domains.dat file. Download mdaemon_domain_add.vbs.txt, rename it to .vbs and use: “cscript mdaemon_domain_add.vbs”
- Import all Users/Password in MDaemon
When you saved your IMail users in a separate database (via ODBC), you can view the password in clear text. When you saved the IMail users into your registry, the password was encrypted!
Download imail_export_users.vbs.txt to export IMail registry users to MDaemon (includes decrypting the password and users mailbox size!).
Rename it to .vbs and use: “cscript imail_export_users.vbs > export.txt” on the computer on which IMail is installed, then import the ‘export.txt’ file into MDaemon via Accounts -> Importing -> ‘Import accounts from a comma delimited text file…’
- Migrate all E-Mail from IMail to MDaemon
IMail stores E-Mail in .mbx files (Unix Mailbox format), 1 file for every folder.
MDaemon stores E-Mail in all separate (.msg) files.
Download imapsync-1.452.zip (free). Unpack and use the following line to migrate all E-Mail from an IMail mailbox to a MDaemon mailbox.
imapsync.exe --host1 192.168.0.1 --user1 email@example.com --password1 test123 --host2 localhost --user2 firstname.lastname@example.org --password2 test123 --sep1 . --prefix1 '' --sep2 . --useuid --usecache --subscribe --noreleasecheck --buffersize 33554432 --regextrans2 "s#^Deleted$#Deleted Items#" --regextrans2 "s#^Deleted Messages$#Deleted Items#" --regextrans2 "s#^Sent$#Sent Items#" --regextrans2 "s#^Sent Messages$#Sent Items#" --regextrans2 "s/\/\./\//g" --regextrans2 "s/^\.//g" --regexflag "s#\\SEEN#\\Seen#" --regexflag "s#\\DRAFT#\\Draft#" --regexflag "s#\\ANSWERED#\\Answered#" --regexflag "s#\\FLAGGED#\\Flagged#" --regexflag "s#\\DELETED#\\Deleted#"
The above explained (in short):
– IMail’s mailbox separator is “.” and prefixed by “”
– MDaemon’s mailbox separator is “.” and has no prefix
– Use cache and max. 32MB ram buffer
– Imail uses different folders names for ‘Sent Items’ and ‘Deleted Items’ than MDaemon does.
– MDaemon does not support (sub)folders starting with a “.” (dot), eg. ‘.Folder’ or ‘Folder\.Folder’
– IMail stores all message flags (read, answered, deleted, etc.) in UPPER CASE while MDaemon stores it in the normal casing.
- Migrate IMail aliases to MDaemon aliases and Mailing Lists and
Migrate webmail signatures from IMail to MDaemon
In IMail it was possible to make an alias point to several E-Mail addresses, separated by a comma.
In MDaemon you can point an alias to only 1 E-Mail address. To keep these same ‘group’ aliases in MDaemon as we had in IMail, we migrate it to MDaemon Mailing Lists.
I wrote a scripts which converts the aliases (including group aliases to mailing lists) and IMail webmail signatures to MDaemon webmail signatures.
Download migrate_signature_and_alias.vbs.txt, rename it to .vbs and review the variables in the script. Then run using “cscript migrate_signature_and_alias.vbs” on the IMail computer.
- Migrate IMail Addressbook (in Webmail) to MDaemon Addressbook
The IMail addressbook is stored in an Access database while MDaemon hold it’s contacts in a vCard-format file called “Contacts.IMAP\AddrBook.mrk” in the User’s folder.
Download migrate_contacts.vbs.txt, rename it to .vbs, map a drive from the IMail server to the Mdaemon directory (see script) and use “cscript migrate_contacts.vbs”.