Articles

Print

Copy IMAP Folders between Servers / Accounts

Written by Joshua Lyon on .

Prologue:
So I was having a lot of issues getting my e-mail copied from one IMAP e-mail account to another without having issues.  I tried copying the e-mails directly from one IMAP inbox to another without much success. Basically the server would start rejecting the copies after 10-20 e-mails.

In Thunderbird (Mozilla’s mail application) I was getting the following message: “Sending authenticate login information..” and the client would just stop copying e-mails.

In Outlook Express 6, the client application would begin copying the files over then give me a non descript error message.

What I will explain in the following post is how I successfully copied mail files from one IMAP server to another.  This method will keep all the existing information (headers) like the received date, sender name, etc.  I know it is possible to simply Forward all the messages but then you will lose all this data, which wasn’t an option for me.

Overview:
The steps involved include (a) creating the two accounts in a mail client, (b) downloading the mail from the “old” account to a local folder, and (c) moving the mail from the local folder to the “new” account.

I initially overlooked the simplicity of this option, but it works simply and successfully. For the purpose of this document the “old” account refers to the account that you will be transferring mail from and the “new” account refers to the account that you will be transferring mail to. You can probably use most mail clients to do this, but I will use Outlook Express 6 to explain because pretty much everyone with Windows XP has this on their computer.

The Steps:


1.      Create the two (2) accounts in the mail client

a.      In Outlook Express, click Tools -> Accounts in the menu.

b.      Click the Add button and choose mail

c.       Follow the prompts, filling in your “old” IMAP account information

d.      Once you add the account it will ask you if you want to download the folders for the new account you just created. Choose yes.

                                                              i.      Make sure each folder is viewable. You can do this by selecting a folder and choosing Show if it is not viewable.

e.      Repeat the above steps for the “new” IMAP account

      2. Copy the mail from the old account to a local mail folder

a.      Decide which mail folder you would like to download the mail from

b.      Make sure there is a folder with a similar name in the Local Folders (ie. If you want to download your Spam folder from the old account, make sure there is a folder under the Local Folders called Spam)

                                                              i.      If the folder doesn’t exist, simply create it by right clicking on the Local Folders and selecting “New folder…”

c.       Open the folder you want to download the mail from

d.      Select a mail item from the right-hand pane

e.      Click Edit -> Select All in the Outlook menu (all of the mail items should be selected now – this can also be done by pressing CTRL+A)

f.        Right click one of the selected mail items and choose Copy to Folder from the menu

g.      Expand the Local Folders item if it is not selected and choose the local folder you would like to copy the mail to and press Ok. (from step b, this would be the local Spam folder we created) Outlook will download all the files and transfer them to the local folder.

h.      Repeat the above steps for all of the folders you would like to copy.

      3. Move the mail from the local folder to the new account

a.      Decide which mail folder you would like to transfer

b.      Make sure there is a folder with a similar name on the new account (ie. If you want to upload the Spam folder from the Local Folders, make sure there is a folder in the new account called Spam)

                                                              i.      If the folder doesn’t exist, simply create it by right clicking on the account name and selecting “New folder…”

c.       Open the Local Folder you want to upload the mail from

d.      Select a mail item from the right-hand pane

e.      Click Edit -> Select All in the Outlook menu (all of the mail items should be selected now – this can also be done by pressing CTRL+A)

f.        Right click one of the selected mail items and choose Move to Folder from the menu

g.      Expand the new account and choose the new account folder you would like to move the mail to and press Ok. (from step b, this would be the local Spam folder) Outlook will upload all the files and transfer them to the remote folder.

h.      Repeat the above steps for all of the folders you would like to copy.

Some Reasoning:
The reason we chose to copy the files from the old account to a local folder is for backup purposes.  If we end up having an issue during the process, this allows us to delete whatever we need and start fresh using the files on the old server.

The reason we choose to move the files from the local copy we created to the new account is to account for transfer issues. In case the server locks up or you lose connection, you won’t have to start all over. You can simply resume moving the remaining files from the local folder to the new server.

Comments   

 
Mike ODonnell
0 #6 Mike ODonnell 2012-12-26 17:58
I am using essentially this method on Thunderbird, but I do it one folder at a time, and use a single local folder named "Stage". I don' *think* that having the same name makes a difference.

It works a lot of the time, and is a big improvement on my attempts to copy directly from one remote IMAP service to the other (no doubt mediated invisibly on my local machine). BUT, for large sets of messages the process hangs for hours with no useful messages, and leaves me with a fraction of the messages transferred, and partial information on some more of the headers. I can't find any way to predict how much I can transfer at one time. Eventually, I'll have to do incremental transfers, but it's a big pain to have a folder half here, half there.
Quote | Report to administrator
 
 
tony kay
0 #5 tony kay 2012-06-16 23:11
would appreciate your help on a question on Copying or Moving one imap subfolder say A1 to another Imap say B
(I am not sure if relevant but Imap A is with 1and1 and B is with BTyahoo)

I am trying to do this through windows mail which i use and i can access and view both the above imaps
(the further reason for doing this i want to copy the subfolder into BTyahoo as archive / storage (as it is unlimited) and delete the 1and1 one which limits to 2gb total)

Initially i tried to select ALL the individual emails from imap A1, COPY or MOVE (tried both) and then paste into imap B which works BUT the dates are all showing as today's and not the original ones (so its pointless)

I then tried to select entire subfolder A1 and Copy or Move (tried both) to imap B but nothing happens, nor any error messages

I also created a local folder (as you suggested) and also created same name subfolder in imap 2, then copied / moved emails but they shows todays date again

I also tried to copy / move the whole subfolder 1a to the local folder you suggested (before copying / moving to imap 2) but nothing happens

Thank you in advance

Tony
Quote | Report to administrator
 
 
Joshua Lyon
0 #4 Joshua Lyon 2010-10-29 10:37
@Steve: I'm glad I could help... thanks for the comment!
Quote | Report to administrator
 
 
steve
0 #3 steve 2010-10-27 20:56
Hi josh,

This is a big time and headache saver for me. I've been googling around for a while now. All I wanted to do is use IMAP to download all our email folders for about 30 users and back them up locally on their individual outlooks without the IMAP syncing trash.

Your tip really helped.

Thanks again
Quote | Report to administrator
 
 
Sid Ahmed
0 #2 Sid Ahmed 2010-08-08 15:02
Hi Josh!
I wanna tell you that you saved me a lot of trouble with simple yet very efficient procedure on how to transfer emails between imap accounts :-)
thanks again for this very helpful article.
God bless you
Quote | Report to administrator
 
 
praglen
0 #1 praglen 2010-07-16 16:39
I have two Yahoo E-mail accounts. How can I copy the entire(or folder by folder) group from one E-mail account to the other?
Quote | Report to administrator