Migrating emails from mailenable to exim

If you want to copy emails from a windows mailenable server to linux server with exim, you can do it as follows.

I am copying the email account test@abc.com to new server. Its password is test123c on both servers.

root@abc [~]# cd /usr/local/src/

root@abc [/usr/local/src]#  wget http://home.arcor.de/armin.diehl/imapcopy/imapcopy.tar.gz

root@abc [/usr/local/src]#  tar -xvf imapcopy.tar.gz

root@abc [/usr/local/src]# cd imapcopy

root@abc [/usr/local/src/imapcopy]# ls
./  ../  imapcopy*  ImapCopy.cfg

root@abc [/usr/local/src/imapcopy]# cp -pv ImapCopy.cfg ImapCopy.cfg.original

`ImapCopy.cfg’ -> `ImapCopy.cfg.original’

root@abc [/usr/local/src/imapcopy]# vi ImapCopy.cfg
You need to edit the following values to make the migration smoother.

##############
# Sourceserver
##############
SourceServer 1.2.3.4 (Source Server IP Address)
SourcePort 143
###################
# Destinationserver
###################
DestServer localhost
DestPort 143

#############################
# List of users and passwords
#############################

#       SourceUser    SourcePassword   DestinationUser  DestinationPassword
Copy   “test@abc.com”  “test123c” “test@abc.com”  “test123c”

[/stextbox]

Make sure you are able to connect to port 143 of source server from destination server

[stextbox id=”info”]

root@abc [/usr/local/src/imapcopy]# telnet 1.2.3.4  143
Trying 1.2.3.4…
Connected to abc.greproot.com (1.2.3.4).
Escape character is ‘^]’.
* OK IMAP4rev1 server ready at 05/07/14 05:46:17
^]
telnet> q
Connection closed.
[/stextbox]

Now test the configuration

[stextbox id=”info”]

root@abc [/usr/local/src/imapcopy]# ./imapcopy -t
IMAPCopy 1.04 – 2009/07/18 [compiled with FreePascal]
written 2001-2009 by Armin Diehl <ad@ardiehl.de>
Running on Linux

Login on sourceserver as test@abc.com OK
Login on destinationserver as test@abc.com OK
Getting folderlist on sourceserver OK, found 1 folder

1 User processed, 0 Messages copied, 0 Error(s)
0 Folder(s) created, 0 Folder create errors, 0 Folder not copied
[/stextbox]

The configuration looks fine without any errors. Now we can start copying the email account contents.

[stextbox id=”info”]

root@abc [/usr/local/src/imapcopy]#./imapcopy
IMAPCopy 1.04 – 2009/07/18 [compiled with FreePascal]
written 2001-2009 by Armin Diehl <ad@ardiehl.de>
Running on Linux

Login on sourceserver as test@abc.com OK
Login on destinationserver as test@abc.com OK
Getting folderlist on sourceserver OK, found 1 folder
Getting List of messages in “INBOX” OK, 7 Messages found
Processing Folder INBOX
7 Messages copied, 0 Errors

1 User processed, 7 Messages copied, 0 Error(s)
0 Folder(s) created, 0 Folder create errors, 0 Folder not copied
[/stextbox]

Now the mails have been copied. Try accessing webmail of the account test@abc.com and see if mails are displayed fine.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>