[Ubuntu] Migrate E-mail using imapcopy

What is imapcopy?

IMAPCopy is a small command line tool to copy messages for multiple users from one imap server to another. It was designed for migration of Linux imap mail to exchange servers.

Installation Debian and Ubuntu

  • Install the package via SSH

apt-get install imapcopy

  • Create a configuration file you can use the example below

SourceServer mail.domainname.net

SourcePort 143

DestServer ex.myhosting.com

DestPort 143

 

#CreateEmptyFolders

 

skipfolder INBOX.Trash

skipfolder INBOX.Sent

skipfolder "INBOX.Sent Objects"

 

#       SourceUser                  SourcePassword   DestinationUser DestinationPassword

Copy    "colin@domainname.net"       "password"         "Tester@domainname.com"          "2dngog.0?bogcnb"

 

Run the import

  • Running the import is actually very simple once the configuration is setup simply type imapcopy on the directory the cfg file is located in.
  • If successful the output of the application will be as follows

imapcopy

IMAPCopy 1.04 - 2009/07/18 [compiled with FreePascal]

written 2001-2009 by Armin Diehl <ad@ardiehl.de>

Running on Linux

 

This program is free software; you can redistribute it and/or

modify it under the terms of the GNU General Public License

as published by the Free Software Foundation; either version 2

of the License, or (at your option) any later version.

 

This program is distributed in the hope that it will be useful,

but WITHOUT ANY WARRANTY; without even the implied warranty of

MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

GNU General Public License for more details.

 

You should have received a copy of the GNU General Public License

along with this program; if not, write to the Free Software

Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,

MA 02110-1301, USA.

---------------------------------------------------------------------------

Login on sourceserver as colin@domainname.net OK

Login on destinationserver as Tester@domainname.com OK

Getting folderlist on sourceserver OK, found 1 folder

Getting List of messages in "INBOX" OK, 1 Messages found

Processing Folder INBOX

1 Messages copied, 0 Errors

 

1 User processed, 1 Messages copied, 0 Error(s)

0 Folder(s) created, 0 Folder create errors, 0 Folder not copied

 

Was this article helpful?
0 out of 0 found this helpful

Have more questions? Contact our support instantly via Live Chat