Migration Procedures from Traditional mbox(postfix) to Dbmail

1. Setup a new server (e.g: server_new)
- installed with mysql,dbmail-x.x.x

2. Create users using the command below:
dbmail-users -a "user_name" -w "password" -p "encryption mode" -s
"username@mailserver"

For example :
dbmail-users -a john -w 123456 -p md5-base64 -s john@mycompany.com

3. Copy the mail which need to be migrated from the old server to new server (server_new). Access to the folder/directory where the copied mails will be
placed and run the command below.

a) To migrate the inbox messages :
scp -prv root@old_server:/var/spool/mail/user

For example :
scp -prv root@old_server:/var/spool/mail/john

b) To migrate other folder messages :
scp -prv root@old_server:/home/user/mails/folder

For example :
scp -prv root@old_server:/home/john/mails/saved-messages

4. From the copied folder/directory, migrate the messages using the command
below:

/dbmail installed directory/dbmail-x.x.x/contrib/mailbox2dbmail/mailbox2dbmail
--user "user" --mail "source_mail" --box "destination_mail" -t mbox

For example :

/dbmail installed directory/dbmail-x.x.x/contrib/mailbox2dbmail/mailbox2dbmail
--user john --mail saved-messages --box saved-messages -t mbox

* Repeat the command by just changing the "source mail" and "destination_mail"
to migrate various folders.

0 comments: