Gmail IMAP and Thunderbird

It’s here. Finally. Gmail now supports IMAP. Internet Message Access Protocol. IMAP is cool because as you work with your email, moving it to folders, reading it, deleting it, etc. your actions are synced with the mail server. This way if you access the mail again from a different computer you will have everything in the last place you left it and you don’t have to remember what you did last time. Much more advanced them simple POP email.

My favorite client for IMAP is Mozilla Thunderbird. Not just any Thunderbird, Thunderbird Portable Edition. This allows me to keep my copy of Thunderbird on a USB stick and take it, and all of its detailed settings, with me where ever I go.

The things I’m going to show you here will work whether you use the portable edition or not. Google is rolling out IMAP slowly so if you don’t see it right away you will shortly. I’m not going to ‘reinvent the wheel’, Google already provides instructions on how to set up Thunderbird with IMAP.

Getting the most of out Gmail IMAP and Thunderbird

When you set up IMAP in Thunderbird and retrieve your mail for the first time, Thunderbird will create a folder structure with the basic Gmail folders and folders representing all your Gmail tags.

tbimap17 NOTE: When I set mine up I called the account, within Thunderbird, Gmail IMAP. You will see this in screen shots throughout. You may have called yours something different.

Set up your server settings

Right click on the account name (in my case Gmail IMAP) or click Tools –> Account Settings

Click the Server Settings entry on the left

tbimap16

Ensure the following are checked:

  • Check for new messages at startup
  • Check for new messages every 10 minutes
  • When I delete a message Move it to the Trash Folder
  • Clean up (Expunge) Inbox on Exit
  • Empty Trash on Exit

Make sure Sent and Draft mail is available synched to your Gmail from Thunderbird

For Sent:

  • Click the Copies and Folders entry on the left
  • Set “When sending messages, automatically:” to put the outgoing message in your Gmail sent folder by checking “Place copy in”
  • Select Other
  • Navigate to your Account Name –> Gmail –> Sent Mail

tbimap13

For Drafts:

  • Under Drafts and Templates select Other
  • Navigate to your Account Name –> Gmail –> Drafts

Enable Offline Access

If you want access to your email offline, click the Offline & Disk Space entry on the left

  • Select “Make the messages in my inbox available when I am working offline”

If you want other folders available when you are offline, click the button ‘Select Folders for Offline Use’. You will then be able to select your other Gmail tags/folders.

Under Disk Space you can select how to manage these offline files. I chose to have mine deleted after 7 days. I left the selection for read messages unchecked because most often it is something I recently read that I might need again when I can’t connect to the net.

tbimap15

Enable Junk/Spam Sync

  • Click the Junk Settings selection on the left

Ensure the following are checked

  • Enable adaptive junk mail controls for this account
  • Do not mark mail as junk if sender if in your Personal Address book
  • Move new Junk Messages to select Other
  • Navigate to your Account Name –> Gmail –> Spam

tbimap19

Some Tips on how functions map between Thunderbird and Gmail

  • Open a message = Mark a message as read
  • Flag a message = Apply a star to the message
  • Move a message to a folder = Apply a label to the message
  • Create a folder = Create a label
  • Move a message to [Gmail]/Spam = Report a message as spam
  • Move a message to [Gmail]/Trash = Move a message to Trash
  • Send a message = Store message in Sent Mail
  • Delete a message in inbox = Remove the message from inbox
  • Delete a message from a folder = Remove that label from the message
  • Delete a message from [Gmail]/Spam or [Gmail]/Trash = Delete the message permanently

Note: If you want to Archive a message, or several selected messages, drag it to the [Gmail]/All Mail folder

 

Technorati Tags: , , ,
Tweet This! | Buzz This

Tweet This!

43 Responses to “Gmail IMAP and Thunderbird”

  1. How do you get Gmail messages to go to the THunderbird inbox? Or any mail client.

  2. [...] Gmail IMAP and Thunderbird | TechLifeBlogged [...]

  3. What is the easiest way to assign multiple labels, or “copy to multiple folders” at once in Thunderbird?

  4. first, great tutorial. thanks!

    only problem is when i delete a message from the inbox, it is removed entirely – how can i just remove it from the inbox, but leave it in all messages?
    Cheers.

  5. Thanks for the info, I have set my filters up in gmail and it created my folders in Thunderbird as expected.

    My issue is that it copies messages to the correct folders but I would prefer it to move them instead.

    As it is I get the messages in the correct folder and the inbox too.

    I’m sure I could set up the filter in Thunderbird instead but it would be great to have it done by gmail.

    Any ideas?

    Cheers.

  6. Hi,

    I’ve been using Gmail IMAP through TBird and I’m going smooth.

    However, I have some filters that make my messages skip inbox, so I have to periodically check my folders (labels) to see if I’ve got any mails in there.

    Is there a way around this?

    Thanks,
    ~LVS

  7. Hi,

    Phil Spitler wrote on April 7th, 2008 at 8:05 pm:
    >
    > My issue is that it copies messages to the correct folders but
    > I would prefer it to move them instead.
    >
    > As it is I get the messages in the correct folder and the
    > inbox too.
    >
    > I’m sure I could set up the filter in Thunderbird instead but
    > it would be great to have it done by gmail.
    >
    Phil, assuming after all that time you haven’t found the answer yet – or someone else still needs it:

    When setting up your filter rules in GMail, check the setting “Skip the Inbox(Archive it)” and additionally check “Apply the label: “. That way the label “Inbox” will be removed from the filtered message and only the new label will be applied, so the mail will be visible in “All Mails” and accordingly in “Labels”. In Thunderbird the mail then appears in the “Folders” “” and “All Mails”, but not in “Inbox”.

    LVS wrote on May 16th, 2008 at 8:03 am:
    >
    > However, I have some filters that make my messages skip inbox,
    > so I have to periodically check my folders (labels) to see if
    > I’ve got any mails in there.
    >
    > Is there a way around this?
    >
    LVS, right click on the subfolder (label) and choose “Properties”. Then in the tab “General Information” check the setting “Check this folder for new messages”. This should solve the problem.

    In case you have a whole bunch of those subfolders, you might wanna look into the Thunderbird addon “FolderCheck” which adds a new item “Check folder for new items” to the folder’s context menu. That saves you 2 clicks per folder. ;-)

    Regards,
    Rico

  8. Good stuff – thanks!

    I wanted my Thunderbird contacts synced with Google so I installed the Zindus addon: http://www.zindus.com/faq-thunderbird-google/

    It seems to be working well.

  9. Hello,

    Great article thanks.
    I’m about to migrate my gmail account in tbird from pop to imap.

    However, you recommend the following:

    Set “When sending messages, automatically:” to put the outgoing message in your Gmail sent folder by checking “Place copy in”

    But google recommend this:

    Do NOT save sent messages on the server. If your client is sending mail through Gmail’s SMTP server, your sent messages will be automatically copied to the [Gmail]/Sent Mail folder.

    As I haven’t tried yet I can’t really comment on which way is the better one but I would appreciate if anyone could shed some light on that point.

    Kind regards

    Roro

  10. Hello Roro,

    I guess by now you have already found your answer, but anyway.

    I have set up my Thunderbirds on several computers to place a copy of sent messages in the folder “[Google Mail]/Sent Mail”. Note that you have to choose that folder manually (“Other” in account settings -> “Copies & Folders”), not use the default “Sent” folder, else you’d have two different Sent folders.

    As far as I remember I even found these configuration instructions in one of Google’s FAQs, but I’m not sure, might as well have found it elsewhere. Anyway, it seems to work fine.

    The only thing not really working is, when sending mails to a mailing list that also should send a copy of the message to oneself, the message never appears in the Inbox “folder” or any other label. It only remains in “Sent Mail”, and it will only have the typical, rather empty header of a sent message. Somehow strange, since you can never tell if that message was processed by the mailing list or not. And also any thread structure in your Inbox will be disrupted as you don’t see your own messages in TB.

    I recently have been having a problem with Thunderbird and Gmail:

    Thunderbird frequently seems to “forget” my saved password for the Gmail accounts. A window asking for the password for “myaccount@googlemail.com@imap.gmail.com” pops up several times where the password already seems to be entered correctly, at least the box is filled with the correct amount of asterisks. But when confirming with [OK] the box just re-appears. I have to re-enter the password manually, sometimes several times, before TB can connect again to the server.

    I have already reduced the connect interval to 15 minutes or on one of my computers even to 120 minutes, but that did not solve it. It doesn’t matter either if I have set up only one Gmail account with TB or even two, it sporadically happens in both setups. There’s also no difference between TB on Windows or Linux, the behaviour is the on all my computers.

    I noticed that at the same time when my TBs have those troubles, also the Google Webmail interface is very slow or even unusable for a couple of minutes. Is it just that the Gmail servers are overloaded?

    Did someone else experience this? Does someone have a solution? This really stinks, because often I can’t even send mails because of this, or a mail is sent several times because TB thinks it was not sent yet.

    Regards,
    Rico

  11. Rico,

    I have the SAME problem with popup password box as you. It’s realy annoying :( Also wanna find a solution of it.

  12. same problem here D:

  13. I’ve been having the same problem here.

    Happens with both my imap email setups and the google calendars I’ve added to lightning.

    My hope is it’s just a settings problem with TB or something that could be fixed quickly with a patch or add-on from one of the lovely people who do those things.

    My fear is it’s a google problem that will take a long time to fix.

  14. Well, it’s interesting to know that also others have this problem. And I guess only few of those affected actually found their way here.

    I guess as soon as I find time I try to report this “bug” or whatever it is to Google.

    I really started doubting myself. I don’t know how often I checked and re-checked my account settings…

    Regards,
    Rico

    P.S.: Really a pity that it’s not possible to somehow subscribe to this post or especially it’s comments… ;-)

  15. Rico, actually you can subscribe to the comments. The link is in the block of text right under the post. I guess I could make it more obvious. Here is the feed:
    http://www.techlifeweb.com/2007/10/27/gmail-imap-and-thunderbird/feed/

  16. Hi All

    I posted this in Google Appls help forum:

    We have a Google Apps for Domains Premier Edition and are generally
    happy with having all the tools in one place — docs, chat, calendars,
    gmail.

    But we have one BIG problem. Most of our users prefer to use
    Thunderbird to access their Gmail account and not Gmail webclient.
    Thunderbird, being a desktop client, is faster. And looking for mails
    in Thunderbird is also faster than in Gmail because you can sort your
    mails in Thunderbird by date/sender/recipient simply by clicking on
    the column headings.

    BUT we have been having very poor Gmail IMAP server performance in
    Thunderbird since we migrated from our own mails server to Google Apps
    for Domains Permier Edition. Sometimes, it takes forever to
    download a small mail message. Sometimes a folder takes forever to
    list after it is clicked. Sometimes, login fails without reason.
    Sometimes, after successfully logging in to the Gmail account in
    Thunderbird, the user clicks on a folder and then he gets a login
    failed error. Sometimes, the “Sending login information” lasts
    forever. We are experiencing these problems in all our offices
    located all over the country, as well as in our homes. We had the
    settings in the following link but they didn’t work:
    https://mail.google.com/support/bin/answer.py?hl=en&answer=78892#

    Previously, we never had problems without our own IMAP server in
    Thunderbird. We used to have an in-house Zimbra mail server. Before
    that, we used Sendmail/IMAP-UW, and we never had problem accessing our
    own IMAP server in Thunderbird.

    Does anybody else have the same problem? Or is it just us? Or our
    expectations are too high? Gmail IMAP server in Thunderbird is not
    supposed to be as fast as our own IMAP servers?

    Also, will Gmail webclient ever allow fetching of mails from external IMAP servers?
    Right now, it can only fetch mails from POP3 servers.

    Thank you.

    i contacted Google Support and just got a reply.
    Google Support said the IP of its IMAP server changes very frequently
    and
    its DNS TTL is actually only 15 mins, but Windows DNS cache default is
    1 day.
    i am going to reduce the TTL of my Windows DNS cache to 5 mins and see
    if performance will improve.


    my users reported no improvement in performance after the Windows DNS cache TTL change.

    Regards

    Gui

  17. Justin Turner on August 5th, 2008 at 8:00 pm

    I am having the same problem of loggin in issues with thunderbird.

  18. I am having the exacat same problem and its driving me crazy.

    I open and close thunderbird to fix it.

  19. Having the same password forget issue here. Note that it worked when I only had one iMAP account configured in thunderbird, but when I added the 2nd one I now get the problem with both accounts.

  20. [...] Gmail IMAP and Thunderbird [...]

  21. I found a comment on another form dealing with this problem that advised unlocking the gmail CAPTCHA, which can be done here.

    https://www.google.com/accounts/UnlockCaptcha?

    It seems to have worked for me, and I believe I did it with my work email (managed through google apps), but I can’t seem to get it to unlock my co-workers’ CAPTCHA now (through google apps; address@mydomain.com).

    For those who don’t know what this CAPTCHA business is (I didn’t, and still don’t really), it seems to be a test that’s used to distinguish humans from machines to thwart the bad things people do with their machines (like the scrambled words you often have to type in when posting on forums or buying tickets to things online).

    I guess TB has a problem with the gmail CAPTCHA…. At least, that’s what I figure based on the 5 mins I spent looking into what a captcha is.

    Best of luck.

  22. Ok, so now my TB at home is acting up again a month after I first unlocked the CAPTCHA.

    Searched around, and found a claim that setting TB to check email no more than every 10mins does the trick, so I’ll give that a shot.

    The original article is here, in case anyone’s interested:

    http://mr-euro.com/thunderbird-gmail-invalid-username-and-password/

  23. Same problem here… let’s see if this captcha stuff will work…

  24. Resetting or passing the CAPTCHA test unlocked an account that we have. I don’t think any of these other things have anything to do with it, other than perhaps an incorrect password plugged in once that then gets used by THunderbird or other IMAP client to attempt to log in.

    Another explanation would be that crackers are running programs against randomly generated gmail accounts trying to break into them.. Google detects this and turns the CAPTCHA flag on the account that has to be cleared by a human successfully going through that web page.

    COnjecture — perhaps in the past, just logging in successfully via gmail.com web interface.

    Also http://www.googlemail.com might run other versions of their server software.

    Its amusing that some here cast aspersions on google, when Google is just protecting their service from all the BOZOs out there.

  25. I have been accussed of spaming the thunderbird bug fix in bugzilla but I see that in Thunderbird 3.0 there will be a fix!
    https://bugzilla.mozilla.org/show_bug.cgi?id=423354
    I for one, will go with the 3.0 beta and help the developers test it, because this has caused me to use Outlook again.

  26. I had the same problems – having to reenter password, getting timed-out, not able to log in to IMAP. I changed my server settings to smtp.gmail.com instead of smtp.googlemail.com; and that seemed to have worked for me!?!

  27. I’ve seen these problems and when they occur to s user that isn’t the most tech savvy, it really seems to upset them. They were just typing an email and all they want to do is save there draft, but the damn box keeps popping up. I can’t say I get as flustered, but this is a very serious usability problem with no solution that I have seen that is long term effective.

    Dorothy, unfortunately I think your fix worked simply because you restarted the email client, not due to the changes. I’ve got my settings on gmail instead of googlemail and stil experience the exact problems described here.

  28. Same problem here with the password prompts and failed logins. Sometimes restarting TB helps, sometimes it does not. Last time I had the problem, I logged into the web interface and TB/IMAP started working immediately after.

    Has a gmail web interface login *not* fixed this for anyone?

  29. Great tutorial! It was just what I was looking for. I just wanted to say thanks!!

  30. WRONG have alook at
    https://mail.google.com/support/bin/answer.py?answer=78892#

  31. I have added one of my gmail accounts as a new email account in Thunderbird, following the instructions for IMAP under gmail/mozillaZine. The instructions said that my labels in gmail would download as folders in Thunderbird, but they have not. Only the main gmail folders have downloaded — none of my special labels that I created in gmail are listed. Any help would be appreciated!

  32. same prob here guys. been frustrating the @#$@#$ out of me for months now. i retype passwords many times a day. usually after a single retype it works, so that rules out the captcha. ANNOYING and makes me want to switch to something else.

    Im sure this must be affecting a LOT of users….

  33. Make sure you don’t check for new messages at startup or at a regular time period. It says on the mozzilla site you don’t need to do this as gmail lets you know automatically. If I tick off both then tbird keeps asking me and asking me for the password. Very annoying. If I only tick one or none it does not do this. Problem seems to be solved for me.

  34. Thanks Scott, you wrote an awesome tutorial!

    But the only thing I’m still unable to do is to delete a message using Thunderbird with Gmail via IMAP.

    I tried all three settings (mark message as deleted, move to trash and delete permanently), but TB always just removing message from inbox by archiving it – I can see “deleted” message in “All mail” when accessing my Gmail inbox from browser.

    Anybody there have any ideas on that?

  35. Scott: Messages from the Gmail/SPAM and Gmail/Trash-Folder don’t appear in “Gmail/All Mail”. Just reconfigure your TB to use these folders instead of your local ones.

  36. “Check for new messages every 10 minutes” is not needed with IMAP.

  37. How come TBird does not save a format signature like outlook.

    I do not like the Signature card and the regular signature box in the Tools> settings does not have the space to put the info nicely.

    I would like to see my (Name, Title, Company & phone / Fax) everytime when I type a message in the body of the text. However, this is not working.
    I thought this was the weakest gig that TBird people did not incorporate in the program.
    Any help or take on that issue. Am I missing it somewhere. I really don t want to go to Outlook.

    Thx

  38. Giorgio,

    You have to first create an html file that holds your signature. Then, select Tools | Account Settings.

    Next, select the account you want to set a signature for.

    Check the “Attach this signature” box, then click on the “Choose” button and find your html file for your signature.

    Finally, click on “OK”, and you’ll have a signature block!

  39. [...] Tutorial for setting up Thunderbird [...]

  40. thanks this post helped clear my confusion.

  41. i am having the same problem with gmail and google calendar passwords, has anyone found a real solution yet?

    i must confess i am a bit confused by the posts on multiple topics.

    thx

    David

  42. A really poor article. Settings You provided are definitely *NOT* advised by Mozilla. First of all, You should *NOT* mark “check for messages every X minutes”, as Thunderbird supports Gmail IMAP IDLE command and is notified by server automatically about new messages.

    Most people would also like to “Mark as deleted” when they press a “Delete” button as this causes Gmail to archive mail instead of deleting it (and You rarely delete anything in Gmail, only when there is some vulnerable data, space is almost infinite).

    Instead of using this inappropriate tutorial, rather look here:
    http://mail.google.com/support/bin/answer.py?answer=78892

  43. m_gol, thank you for your comments on this 2.5 year old article. Times change.

Leave a Reply