Move mailboxes between IMAP servers with IMAPcopy
TipsMake.com - IMAPCopy allows you to recursively copy all email messages and folders from another IMAP account. It supports IMAP and IMAPS protocols. In this article we will guide you to move mailboxes between IMAP servers using IMAPcopy.
Some notes when using the program:
- IMAPcopy only has a copy function, does not delete mail in the source mailbox.
- To use the program, you must activate the IMAP protocol in both the source mailbox and the destination mailbox.
- You can only copy mail in INBOX , not copy in SENT , DELETED , TRASH . If you use mail client program (MS Outlook, Mozilla Thunderbird, .) to trade mail, when copying mail via mailbox new, the mail client will have to download the whole mail.
In the following illustration we use two Debian or Ubuntu servers. For other distributions, the process is similar, except that the difference between Java and IMAPcopy is different.
Source server: server1.example.com .
Destination server: server2.example.com .
Our purpose is to move the mailbox sales@example.com (username: sales@example.com , password: secret ) on Server1.example.com to the sales@example.com mailbox on server2.example.com ( The username and password are the same as on server1.example.com ).
In addition, Ubuntu users should note that the following command must be run as root , so either add the sudo string after each command line or become root with the command:
sudosu
Prepare
Before we get started, let's check both mailboxes to see what's in it (you can do this by any email client service like Outlook, Thunderbird or web mail like SquirrelMail we use below.) here).
server1.example.com:
server2.example.com:
After doing the following, the three messages in server1.example.com will appear in server2.example.com .
IMAPcopy settings
It is not important to install IMAPcopy on server1.example.com or server2.example.com , you can even install it on a 3rd machine without any trouble.
However, installing Java is necessary with IMAPcopy, so we will install the openjdk-6-jre package. In addition, make sure that the unzip is installed in order to extract the IMAPcopy package.
apt-get installopenjdk-6-jre unzip
Next download and install IMAPcopy in the path / usr / local / imapcopy / as below:
cd / usr / local /
mkdir imapcopy
cd imapcopy
wget http://imapcopy.googlecode.com/files/imapCopy0.3.1.zip
unzip imapCopy0.3.1.zip
Execute the script /usr/local/imapcopy/imapCopy.sh :
chmod + x /usr/local/imapcopy/imapCopy.sh
Proceed to move the mailbox
After successful installation, you start using IMAPcopy as follows:
/usr/local/imapcopy/imapCopy.sh protocol: // user [: password] @server [: port] protocol: // user [: password] @server [: port]
This protocol can use IMAP or IMAPS. If the username is the email address to note, replace @ with % 40 . Finally the command line to copy email messages from sales@example.com on erver1.example.com to sales@example.com on server2.example.com will be:
/usr/local/imapcopy/imapCopy.sh imap: //sales%40example.com: secret@server1.example.com imap: //sales%40example.com: secret@server2.example.com
And here is an example of output:
2011-09-30 13:28: 27,751 INFO ImapCopier - Starting
2011-09-30 13:28: 27,751 DEBUG ImapCopier - Parameters length: 2
2011-09-30 13:28: 27,751 DEBUG ImapCopier - opening conections
2011-09-30 13:28: 27,751 DEBUG ImapCopier - opening of the conection imap server1.example.com
2011-09-30 13:28: 28,737 DEBUG ImapCopier - opening conection to imap server2.example.com
2011-09-30 13:28: 28,998 DEBUG ImapCopier - Creating target Folder: Drafts
2011-09-30 13:28: 29,030 DEBUG ImapCopier - Copying 0 messages from Drafts Folder
2011-09-30 13:28: 29,033 DEBUG ImapCopier - Creating target Folder: Junk
2011-09-30 13:28: 29,058 DEBUG ImapCopier - Copying 0 messages from Junk Folder
2011-09-30 13:28: 29,059 DEBUG ImapCopier - Creating target Folder: Trash
2011-09-30 13:28: 29,061 DEBUG ImapCopier - Copying 0 messages from Trash Folder
2011-09-30 13:28: 29,061 DEBUG ImapCopier - Creating target Folder: Sent
2011-09-30 13:28: 29,120 DEBUG ImapCopier - Copying 0 messages from Sent Folder
2011-09-30 13:28: 29,527 DEBUG ImapCopier - Copying 3 messages from INBOX Folder
root @ server1: / usr / local / imapcopy #
Now on the destination server ( server2.example.com ) will see the email from server1.example.com :
You should read it
- How to set up an IMAP server for an Outlook.com account
- Differentiate POP and IMAP
- 4 reasons to switch to IMAP
- 4 reasons to use IMAP service
- How to set up IMAP / POP, CalDAV or CardDAV accounts on iPhone or iPad
- How to set up Gmail to use IMAP
- Add Gmail account to Outlook 2010 with IMAP
- Email: Differences between POP3, IMAP and Exchange
May be interested
- Transfer mailboxes in Exchange 2007 through the Exchange Management Consolethere are many tasks that every exchange administrator must perform daily and moving mailboxes is one of those tasks. the most obvious example of mailbox migration is when a user is moved from one exchange server to another
- How to Find Incoming Mail Serversto receive mail in email readers such as outlook, thunderbird or email applications on your phone, you need to collect incoming mail server information, including incoming mail server address, software port and device protocol type. server (pop3 or imap). it sounds difficult, but actually everything is available and very easy to find once you know where it is hidden.
- Managing mailboxes in Exchange Server 2007 (Part 2)we have seen the first part about managing mailboxes in exchange server 2007, in part two we can analyze this issue in more depth. in this article, we will look at information in mailboxes, blocking, reconnecting and advanced mailbox features.
- Add Gmail account to Outlook 2010 with IMAPif you want to upgrade outlook 2003 to 2010, you need to use imap with your gmail account to synchronize mail from different machines. follow our instructions, you can use your mail account in any computer.
- The basic advantages of Linux servers and Window serversyou plan to hire a server service to build a website for small businesses, but you need to know the basics of network servers. the whole purpose and total characteristics of a website are the factors that form the server selection
- Manage mailboxes in Exchange Server 2007in this article, we will approach the management of mailboxes in exchange server 2007. this seems to be a simple discussion but we will look at some advanced points related to management tasks. users to support those
- How to turn on POP / IMAP Gmail to use in Outlooksuppose in some case when you try to connect an outlook account to a gmail account, but an error cannot be reached. to fix this error, please refer to the following article of network administrator.
- Instructions for adding email accounts to Gmail on iPhone, iPadgoogle allows you to add third-party email accounts to the gmail app on iphone and ipad. thus, you can simultaneously manage icloud, outlook, yahoo, imap accounts and gmail accounts.
- Instructions on how to move tables in Wordthe following article introduces you to move tables in word. before you move you need to edit the properties for the table otherwise move or copy the table is not in the right position.
- Instructions for registering Voicemail on 3 networks in Vietnamvoicemail (voicemail) is a service that provides audio messages to subscribers every time the subscriber cannot answer or the phone is busy, turn off the phone. as soon as there are calls, the message will immediately go to voicemail so you can hear messages from other subscribers.