6

I currently use POP to access my gmail through thunderbird, but I would like to switch to IMAP so that my folders are mirrored on the server, and my sent emails are also available through the web interface.

The problem is that I have 1000s of emails in many different folders in Thunderbird, and in gmail, all my emails are in the same folder.

How can I perform the migration, and get all my folders from my POP access into Gmail?

Hennes
  • 65,804
  • 7
  • 115
  • 169
mrwooster
  • 241

5 Answers5

8

Setup a new IMAP account in Thunderbird then simply drag&drop your folders from the POP3 account into the IMAP account.

Hennes
  • 65,804
  • 7
  • 115
  • 169
Nicu Zecheru
  • 5,572
1

This post from Google might answer your question on how the transition will work:

How do actions sync in IMAP?

Here's a guide to how other actions in your IMAP client will appear in the Gmail web interface.


I'm not really sure though how this will help you, it just explains how working with IMAP is translated to Gmail.

TFM
  • 4,273
1

You can export your email messages from Thunderbird to an IMAP account preserving the folder structure and avoiding duplicates using MsgExtract.

MsgExtract verifies if the message exist at the target folder prior to uploading it.

You can also suppress the top most folders when replicating the folder structure:

http://docs.maildev.com/article/35-how-can-i-suppress-the-top-folders-when-exporting-email-messages-to-some-target

(Disclaimer, I am the author of MsgExtract)

jponce
  • 619
0

First of all, I thought that the question title is somewhat misleading, because there is no folder structure in the Gmail account to keep. For all I'm concerned, it's supposed to be created.

That being said, I believe copying your local folder structure to your Gmail account is probably the most simple approach. To showcase the procedure, I created a fresh Gmail account and set it up in Thunderbird:

Setting up Gmail account

I made sure to leave messages on the server, which is probably how your account was set up as well:

Leave messages on server

Now, the first thing that comes to mind is

Set up filters in Gmail to replicate your folders

If you always sorted your mail in Thunderbird manually, this is probably not going to be your solution. But if you utilized the Message Filters in Thunderbird to sort your mail into folders, it's probably the easiest path to set up filters in Gmail to apply Labels to your mail.

This will sort your current email and also sort future emails into the correct folder. Something that you will probably find very helpful. Let's look at an example:

Message Filters

The "Amazon" filter

So, this is a filter that looks for the word "Amazon" either in the subject or the sender address. Let's set up the same filter in Gmail. However, it should be noted that the folders in Gmail work a bit different from the folders in Thunderbird. A mail simply has a label attached to it. All mails with the same label can then be seen in the folder assigned to that label.

But this doesn't mean the mail disappears from your inbox. So, for proper sorting, you're going to want to make sure to not place the mail in your inbox. We'll take care of that in a second. Let's begin with the first step.

  1. Click the little triangle in the search box.

    enter image description here

  2. In the resulting form, we can define our search, which we will then turn into our filter. Define the search as shown below. And then click Create filter with this search.

    enter image description here

  3. In the next step, you're going to want to check Skip the Inbox (Archive it). This will make sure the mail only appears in the designated folder.

    You'll also want to apply your label here. To do so, check the box Apply the label, then click Choose label... and then New label.... I'm going to name my label Amazon.

    enter image description here

    Last, but certainly not least, you're going to want to check the box Also apply filter to 1234 matching conversations. This will move all your existing messages from the inbox, to which the filter applies, to the new folder.

    enter image description here

  4. If you now force Thunderbird to reload the IMAP folder structure, you'll see your new Amazon folder with all the mail sorted into it.

I sort my mail manually

So you don't use message filters in Thunderbird and you also don't plan to set them up on Gmail. You simply want your existing local folders to appear in Gmail exactly as they currently do locally, while avoiding to create any duplicate mail items.

The solution has already been given by Nicu Zecheru, just copy all the local mail items to the IMAP account.

However, you've noted 2 issues with that procedure.

  1. You end up with duplicate emails in Gmail
  2. Nested folders don't seem to come across very well.

Regarding 1, I would simply clear my All Mail folder before moving the mail over. Then you end up with only your (previously) local mail.

Regarding 2, I was unable to reproduce this issue. I copied my archive of Stack Exchange newsletter to the newly created account. And the nested folder in it appeared just fine in Gmail. Just make sure to copy your folders to the root of your account and not nest them within the Inbox or [Gmail] folders.

Thunderbird

enter image description here

Gmail

enter image description here

Oliver Salzburg
  • 89,072
  • 65
  • 269
  • 311
0

Gmail doesn't really have folders, just labels, although it maps labels to virtual folders for IMAP. So really what you are talking about is labeling the emails you've already uploaded.

I might take this opportunity to organize my emails and folders using filters, but that probably wouldn't work for me because too many of my folders are not based on the kinds of things a Gmail filter can detect.

I had something of a similar issue when I wanted to make my old pre-Gmail emails searchable by Google. It was hard because I had been using Eudora which didn't even run anymore but I was able to import the emails preserving the folder structure into Thunderbird and then upload from Thunderbird. Of course, I didn't have the duplicates problem because these had never been in Gmail.

Probably what I would do in your case is create a 'zzOldGmail' label and label everything in Gmail (all mail in "All Mail") with it and "archive" all of it. Then upload my POP mail via IMAP. This way I can separate the duplicates easily but I don't have to worry that maybe I deleted the only copy of some piece of mail.

Old Pro
  • 2,603