Gmail: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
(28 intermediate revisions by 3 users not shown)
Line 15: Line 15:
If you're using the same Gmail POP account with multiple email clients you need to enable [http://mail.google.com/support/bin/answer.py?answer=47948&query=recent&topic=&type=f&ctx=search recent] mode in order to let each email client access all of the messages in that account. You can do that by replacing username@gmail.com with recent:username@gmail.com as the username in Tools -> Account Settings -> Server Settings.
If you're using the same Gmail POP account with multiple email clients you need to enable [http://mail.google.com/support/bin/answer.py?answer=47948&query=recent&topic=&type=f&ctx=search recent] mode in order to let each email client access all of the messages in that account. You can do that by replacing username@gmail.com with recent:username@gmail.com as the username in Tools -> Account Settings -> Server Settings.


The account wizard uses googlemail.com instead of gmail.com in the server names. They're equivalent. [http://gmail.google.com/ Gmail] is rebranded as Google Mail in Germany, Austria and the United Kingdom.  
Using OAuth2 for "secure authentication" will popup a window for your password using your systems default browser. It requires cookies to be enabled for google.com. It creates a token that will be used as if it was a stored password, by the password wizard. You can use a normal password instead for "secure authentication". However, unless you log into https://www.google.com/settings/security/lesssecureapps using a browser and select ''Allow to let less secure apps access your Google account'' Gmail may return an error when you try to login if you haven't had the Gmail account for at least 90 days. They have changed the error message several times. Currently it should look something like: "Sending of password for user XYZ did not succeed. Mail server pop.gmail.com responded: Web login required: https://support.google.com/mail/answer/78754". [http://forums.mozillazine.org/viewtopic.php?f=39&t=3027242]
 
Using a password is just as secure as OAuth2, except for the possibility for somebody to use Tools -> Options -> Security -> Passwords -> Saved Passwords to view your saved password. This is really just an attempt to increase use of OAuth2, which supports their business plan by supporting logging into third party web sites such as Facebook or Twitter without exposing the users password. After a while some other email providers such as Yahoo have started doing the same thing to encourage people to use their apps or webmail (instead of a 3rd party email client).
 
If you get a popup later on after things have been working that you have to sign in to the Google account again, and then a "cookies disabled" web page you need to either enable cookies in Tools -> Options -> Privacy -> Web Content or add an exception for Google. [http://www.ghacks.net/2016/08/29/fix-thunderbird-wont-let-you-sign-in-to-gmail/]
 
The account wizard sometimes uses googlemail.com instead of gmail.com in the server names. They're equivalent. [http://gmail.google.com/ Gmail] is rebranded as Google Mail in Germany, Austria and the United Kingdom.
 
If you use the Gmail SMTP server with a different account it will replace the From: address with your Gmail accounts email address unless you add the email address in the Gmail web page at Setting -> Accounts -> "Add another email address"


==POP==
==POP==
* Type: '''POP'''
* Type: '''POP'''
* Server Name: '''pop3.gmail.com'''
* Server Name: '''pop.gmail.com'''
* User Name: '''Your FULL email address'''
* User Name: '''Your FULL email address'''
* Port: '''995''' (this should be automatically set when you select SSL)
* Port: '''995''' (this should be automatically set when you select SSL/TLS)
* Secure connection: '''SSL/TLS'''
* Secure connection: '''SSL/TLS'''
* Secure authentication: '''normal password'''
* Secure authentication: '''normal password'''. (OAuth2 is not supported by Gmail for POP accounts)


==IMAP==
==IMAP==
Line 31: Line 39:
* Port: '''993''' (this should be automatically set when you select SSL)
* Port: '''993''' (this should be automatically set when you select SSL)
* Secure connection: '''SSL/TLS'''
* Secure connection: '''SSL/TLS'''
* Secure authentication: '''normal password'''
* Secure authentication: '''normal password''' or '''OAuth2''' (recommended)


Set tools -> account settings -> server settings -> advanced -> IMAP server directory to [Gmail] to fix problems with how it lists folders in the folder pane.
Set tools -> account settings -> server settings -> advanced -> IMAP server directory to [Gmail] to fix problems with how it lists folders in the folder pane.
Line 40: Line 48:
* Username: '''Your FULL email address'''
* Username: '''Your FULL email address'''
* Secure connection: '''STARTTLS'''
* Secure connection: '''STARTTLS'''
* Secure authentication: '''normal password'''
* Secure authentication: '''normal password''' or '''OAuth2''' (recommended)


Don't configure Thunderbird to save a copy of any messages you send in tools -> account settings -> copies & folders. Gmail's SMTP server automatically saves a copy of any message you send in the Sent Items folder for you.  
Don't configure Thunderbird to save a copy of any messages you send in tools -> account settings -> copies & folders. Gmail's SMTP server automatically saves a copy of any message you send in the Sent Items folder for you.  
Line 46: Line 54:
The SMTP server also supports using port 465 with SSL/TLS. [http://support.google.com/mail/bin/answer.py?hl=en&answer=13287]
The SMTP server also supports using port 465 with SSL/TLS. [http://support.google.com/mail/bin/answer.py?hl=en&answer=13287]


==Troubleshooting and Gmail quirks==
==Subscriptions==
Gmail treats POP and IMAP messages individually and not as a threaded conversation.
 
===Subscriptions===


Subscriptions control whether an IMAP folder is visible in the folder pane (and any lists of folders). If it is cluttered with folders you don't normally use, you might want to hide some by unsubscribing them. This will however prevent you from being notified if you get new mail that is stored in them.
Subscriptions control whether an IMAP folder is visible in the folder pane (and any lists of folders). If it is cluttered with folders you don't normally use, you might want to hide some by unsubscribing them. You won't be notified of new mail in unsubscribed folders.  
   
   
The All Mail folder contains a copy of all messages for the Gmail account. This is an artifact of how Gmail implemented labels, not a Thunderbird quirk. Thunderbird 3.x enables "message synchronization" by default, which keeps a local copy of all IMAP folders on your hard disk. If All Mail is subscribed, this doubles the amount of disk space used by your Gmail account and may cause some problems. It is recommended you unsubscribe from the All Mail folder.
You can subscribe or unsubscribe a folder by:
You can subscribe or unsubscribe a folder by:


#Right click on the Inbox.
#Right click on the Inbox in the folder pane.
#Select Subscribe.
#Select Subscribe in the context menu.
#Click on the '>' next to the Inbox to expand the folder list.
#Click on the '>' next to the Inbox to expand the folder list.
#Check any folders you want to make visible (subscribe), uncheck any you want to hide (unsubscribe).
#Check any folders you want to make visible (subscribe), uncheck any you want to hide (unsubscribe).
#Press the OK button.
#Press the OK button.


You can also use the Subscribe and Unsubscribe buttons in that menu.
You can also use the Subscribe and Unsubscribe buttons in that menu. If View -> Folders is set to Unified instead of All, right click on the accounts name underneath the (unified) inbox at the top of the folder pane since that view displays the inbox folder differently.


To actually free the disk space, you have to navigate to the imapmail directory of your Thunderbird profile, then to the Gmail account and [Gmail].sbd, and delete the "All Mail" file and All Mail.msf.
==All Mail==
 
Gmail IMAP accounts have a All Mail folder which tracks every message. This is an artifact of how Gmail implemented labels, not a Thunderbird quirk. That folder is also used as the archive folder.
 
[[Menu_differences_in_Windows,_Linux,_and_Mac | Tools -> Account Settings]] -> Gmail -> Synchronization & Storage -> Advanced is configured to keep a local copy of all IMAP folders on your hard disk. From a performance point of view you may wish to unsubscribe All Mail.  (Note: Prior to version 17, being subscribed to All Mail folder doubles the amount of disk space used by Thunderbird to store your Gmail account ,and may cause some problems. Nowever, starting with version 17, with fixed [https://bugzilla.mozilla.org/show_bug.cgi?id=721316 bug 721316] only ONE copy of every newly downloaded message is kept on disk, so there is no need to unsubcribe from a storage point of view.)  The safe way to unsubscribe and free the related disk space is:
 
#Uncheck it in Synchronization & Storage -> Advanced
#Unsubscribe it (see above)
#Press the "show folder" button in Help -> Troubleshooting Information to view the profile directory using Windows Explorer.
#Exit Thunderbird.
#Go to ..\ImapMail\imap.gmail.com (or ..\ImapMail\imap.googlemail.com if you use the googlemail mail server)
#Delete both "All Mail." and "All Mail.msf".
#Restart Thunderbird.
If you have multiple Gmail IMAP accounts some of the directories will have a numeric prefix such as imap.gmail-1.com. Look at the "Local Directory" setting at the bottom of the Tools -> Account Settings -> account_name -> Server Settings (by the browse button) to find the name of that account's directory.
 
==Less Secure Apps==
 
Google is [http://googleonlinesecurity.blogspot.co.uk/2014/04/new-security-measures-will-affect-older.html trying to push email clients] to either use two factor authentication or OAuth2, rather than simply logging in with POP/IMAP/SMTP using your username/password. They are doing this by gradually increasing the number of times they prevent a email client from logging in with a password, claiming they did that because the email client was not secure enough. This is not limited to Thunderbird, it occurs with almost any email client. It has nothing to do with whether the email client is using the latest version of SSL/TLS or [https://en.wikipedia.org/wiki/Forward_secrecy Perfect Forward Secrecy], its strictly an authentication issue. If you run into this your Gmail account may either appear to hang, you get some type of “Password incorrect” error or you get a error message roughly like:
 
''We recently blocked a sign-in attempt to your Google Account [XXXX@gmail.com]. If this was you you can switch to an app made by Google such as Gmail to access your account (recommended) or change your settings at https://www.google.com/settings/security/lesssecureapps so that your account is no longer protected by modern security standards. To learn more, see https://support.google.com/accounts/answer/6009563''
 
If you keep using the same TCP-IP address for your PC/laptop you are usually okay. If you run into this problem log into https://www.google.com/settings/security/lesssecureapps using a browser and select “Allow” to let less secure apps access your Google account. [http://forums.mozillazine.org/viewtopic.php?p=13741385#p13741385]
 
[https://superuser.com/questions/855676/why-does-google-call-thunderbird-less-secure Why does Google call Thunderbird “less secure”?] has some useful comments such as "OAuth is more secure because it only need to decrypt the keyring (i.e. passwords in plain text) for the very short duration while you authorize the mail agent, this is true whether you do the authentication in browser or if the mail software itself supports inbuilt OAuth authorization." [https://www.duosecurity.com/blog/bypassing-googles-two-factor-authentication Bypassing Googles two factor authentication] and [https://www.brighttalk.com/webcast/7651/69283 Google-jacking: A review of Google's 2-Factor Authentication] discusses some of the risks of how they implemented two factor authentication.
 
==Troubleshooting and Gmail quirks==
Gmail treats POP and IMAP messages individually and not as a threaded conversation.


===Compatibility===
===Compatibility===
The IMAP support is buggy/incomplete, though it's improved a lot since it was first available.
 
* \Answered and \Recent flags on messages are not supported.
* \Recent flags on messages are not supported. The \Answered flag is not preserved when a message is moved or a label is added to the message [https://support.google.com/mail/answer/78761?hl=en]
*Only the From, CC, BCC, To, and Subject headers can be searched. All searches are assumed to be words. Searching for messages based on the Subject fails if it contains an underscore, but the search incorrectly finds messages whose body contains an underscore.  Subject searches also fail if the search string contains a dot or an open or closed parenthesis as in the correct subject of messages. For example, a search of "2006.01.15" fails to find any message containing "2006.01.15" in the subject field (an exact search such as "2006.01.15 hello" also fails to find a message exactly titled "2006.01.15 hello").  [http://groups.google.com/group/Gmail-Help-POP-and-IMAP-en/browse_thread/thread/ac6b94cd09ec90c5/c6a9b01dd59abb0b#c6a9b01dd59abb0b This bug has been raised to the Gmail team] and they are aware of it.
*Only the From, CC, BCC, To, and Subject headers can be searched. All searches are assumed to be words.  
* If you exceed 15 connections per account you will get either a "Too many simultaneous connections" or a "Account exceeded command or bandwidth limits" error. Typically, an additional connection needed for each folder that you automatically check for new mail for, so this might limit how many folders you can enable for "when getting new mail for this account, always check this folder" in folder properties. This error can also cause you to be blocked from Gmail for 24 hours. [http://support.google.com/mail/bin/answer.py?hl=en&answer=97150] [https://bugzilla.mozilla.org/show_bug.cgi?id=806760]


===Labels===
===Labels===
Line 82: Line 113:
Moving back of mail in [Gmail]/All Mail of IMAP to any IMAP mail folder(except [Gmail]/Spam) restores all Gmail's label.
Moving back of mail in [Gmail]/All Mail of IMAP to any IMAP mail folder(except [Gmail]/Spam) restores all Gmail's label.


A copy of a message is stored for each label. That means if you assign two labels to a message and star it using Gmails webmail it has a copy in two folders named after the label, the All Mail folder, and the Starred folder. If you copy a message to multiple remote folders (using Thunderbird) it will be marked with the corresponding labels when viewed using Gmail webmail.
A single copy of each message is stored in the account, and if the messages has multiple labels there are pointers to that copy, a change introduced in [https://bugzilla.mozilla.org/show_bug.cgi?id=721316 version 17.0.2 by bug 721316]. (Prior to version 17.0.2 a copy of a message is stored for each label. That means if you assign two labels to a message and star it using Gmails webmail it has a copy in two folders named after the label, the All Mail folder, and the Starred folder.) If you copy a message to multiple remote folders (using Thunderbird) it will be marked with the corresponding labels when viewed using Gmail webmail.


If you move a message into the Spam folder, it is treated the same as if you had reported it in Gmail webmail using 'Report Spam'. See [http://mail.google.com/support/bin/answer.py?answer=77657&topic=12762 How do actions sync in IMAP?] on Gmails web site for more information on how it maps things.
If you move a message into the Spam folder, it is treated the same as if you had reported it in Gmail webmail using 'Report Spam'. See [http://mail.google.com/support/bin/answer.py?answer=77657&topic=12762 How do actions sync in IMAP?] on Gmails web site for more information on how it maps things.
Line 92: Line 123:


* Gmail imposes an unspecified limit on [https://mail.google.com/support/bin/answer.py?answer=81312&topic=12763 how many messages you can upload] during a short amount of time. If you exceed it, you get temporarily locked out of the account. It is not clear yet whether this is actually a bandwidth limit. A similar limit has been reported in the forums for ''downloading'' messages. This was primarily observed when [[offline folders]] are enabled. In those cases, a large amount of messages was downloaded on initial synchronization or when reindexing an IMAP folder.
* Gmail imposes an unspecified limit on [https://mail.google.com/support/bin/answer.py?answer=81312&topic=12763 how many messages you can upload] during a short amount of time. If you exceed it, you get temporarily locked out of the account. It is not clear yet whether this is actually a bandwidth limit. A similar limit has been reported in the forums for ''downloading'' messages. This was primarily observed when [[offline folders]] are enabled. In those cases, a large amount of messages was downloaded on initial synchronization or when reindexing an IMAP folder.
* Gmail periodically re-indexs your mailbox. If you're using a IMAP server its possible deleted messages from your Sent Mail folder might get resurrected when that happens. You can prevent that by setting "When a message is marked as deleted and expunged from the last visible IMAP folder:" to "Immediately delete the message forever" in Gmail webmail's "Forwarding and POP/IMAP" settings. [http://forums.mozillazine.org/viewtopic.php?f=39&t=2710145]


* If large messages or attachments are truncated, set ''mail.server.default.fetch_by_chunks'' = ''false'' to work around a size bug in Gmail.
* If large messages or attachments are truncated, set ''mail.server.default.fetch_by_chunks'' = ''false'' to work around a size bug in Gmail.
Line 116: Line 149:
==Mail fetcher==
==Mail fetcher==
Gmail supports a way to periodically fetch email from up to five POP accounts and merge them into your inbox. The POP accounts could be provided by Gmail or another email provider. It works with Thunderbird, but you have to configure [http://mail.google.com/support/bin/answer.py?hl=en&answer=21288 mail fetcher]using Gmail webmail.
Gmail supports a way to periodically fetch email from up to five POP accounts and merge them into your inbox. The POP accounts could be provided by Gmail or another email provider. It works with Thunderbird, but you have to configure [http://mail.google.com/support/bin/answer.py?hl=en&answer=21288 mail fetcher]using Gmail webmail.
==Two step verification==
The Google Account help advocates using [http://support.google.com/accounts/bin/answer.py?hl=en&answer=1085463&topic=1056283&ctx=topic two step authentication]. That sends a code (a minimum of once a month but ideally every time you log in) to your cell phone that you need to enter when logging in using a browser. However applications such as email clients can't do that. If you configure two step verification you need to create an [http://support.google.com/accounts/bin/answer.py?hl=en&answer=185833&topic=1056283&ctx=topic application specific password] for Thunderbird that you use instead of the normal password. The application specific password doesn't change when a new code is sent to your cell phone. If you created a application specific password, you use it for a while, and later on its rejected, forcing you to create another one, try deleting all google cookies using [[Menu_differences_in_Windows,_Linux,_and_Mac | Tools -> Options -> Privacy -> Show Cookies]], exit and restart Thunderbird. [http://forums.mozillazine.org/viewtopic.php?f=39&t=3027516]
Two step verification is not needed, and not recommended. Use a strong password, and don't use the same password with other email providers/web sites, instead. However, if you have another email account it is a good idea to [http://support.google.com/accounts/bin/answer.py?hl=en&answer=183726 set a recovery email address] in case you ever forget/lose your password.
==Synchronizing contacts==
[https://plus.google.com/+Gmail/posts/fcxdVaH7faC Gmail supports the CardDAV protocol] (an address book client/server protocol designed to allow users to access and share contact data on a server). Currently the [http://www.sogo.nu/english/downloads/frontends.html SoGo connector] add-on is the best way to add CardDav support to Thunderbird. However, it has a reputation as being buggy and having poor support. There is a [https://bugzilla.mozilla.org/show_bug.cgi?id=546932 bug report] requesting built-in support for CardDAV. The address book is being completely redesigned and will include support for multiple contact providers. Based on [http://mikeconley.ca/blog/ this blog post] it looks like that will eventually include support for CardDAV. See [http://forums.mozillazine.org/viewtopic.php?f=28&t=2478977 this forum thread] for information on other alternatives.
The most popular solution is to use an add-on such as [https://addons.mozilla.org/en-us/thunderbird/addon/zindus/?src=search Zindus] or [https://addons.mozilla.org/en-us/thunderbird/addon/google-contacts/ Google Contacts] to synchronize your address book with Google Contacts.
Gmail does not provide a LDAP server. LDAP is another protocol to access contact data. Thunderbird has built-in support for creating an address book that uses a LDAP server, but no support for modifying its contacts. You used to be able to use [http://gcaldaemon.sourceforge.net/ GCALDaemon] to provide a the equivalent of a Gmail LDAP server, but it used the deprecated GData API, and doesn't work anymore.
==Variants==
Most people use the free version of Gmail. There is a commercial version of Gmail called G Suite. It used to be called "Google Apps for Your Domain". The main difference is that it has higher limits and is designed for companies that want to use their own domain in the email address. There is also another free version of Gmail called [https://www.google.com/inbox/ Inbox by Gmail] that has a alternative user interface that has more of a focus on automatically classifying the content. Its available as a iOS or Android app or webmail (https://inbox.google.com/) . The app appears to be just another front end to a Gmail account, using the same mail servers.


==See also==
==See also==
Line 124: Line 173:
* [http://support.google.com/a/bin/answer.py?hl=en&hlrm=en&answer=33352 Configure email delivery] describes what your admin needs to do to use your own domain with the Gmail mail servers.
* [http://support.google.com/a/bin/answer.py?hl=en&hlrm=en&answer=33352 Configure email delivery] describes what your admin needs to do to use your own domain with the Gmail mail servers.
* [http://aaron-kelley.net/blog/2008/08/disable-gmail-spam-filter-include-spam-in-pop3-download/ Disable Gmail spam filter, include spam in POP3 download]
* [http://aaron-kelley.net/blog/2008/08/disable-gmail-spam-filter-include-spam-in-pop3-download/ Disable Gmail spam filter, include spam in POP3 download]
* [http://support.google.com/mail/bin/static.py?hl=en&page=known_issues.cs Gmail known issues]
* [https://support.google.com/mail/troubleshooter/4530113 Gmail troubleshooter]
* [https://www.wordfence.com/blog/2017/01/gmail-phishing-data-uri/ Highly Effective Gmail Phishing Technique Being Exploited]
* [http://support.google.com/mail/bin/answer.py?hl=en&answer=77657&topic=1668961&ctx=topic How what you do in a email client appears in webmail]
* [http://support.google.com/mail/bin/answer.py?hl=en&answer=77657&topic=1668961&ctx=topic How what you do in a email client appears in webmail]
* [https://mail.google.com/support/bin/answer.py?ctx=gmail&hl=en&answer=21288 How to automatically fetch email from other accounts into your Gmail account]
* [https://mail.google.com/support/bin/answer.py?ctx=gmail&hl=en&answer=21288 How to automatically fetch email from other accounts into your Gmail account]
* [http://gmail.google.com/support/bin/answer.py?answer=13627 What it means if the Gmail radio buttons for POP don't remain selected]
* [http://gmail.google.com/support/bin/answer.py?answer=13627 What it means if the Gmail radio buttons for POP don't remain selected]
* [http://www.zindus.com/faq-thunderbird-google/ Zindus add-on to sync address book with Gmail]
* [http://www.zindus.com/faq-thunderbird-google/ Zindus add-on to sync address book with Gmail]
   
* [http://mailman13.u.washington.edu/pipermail/imap-protocol/2014-September/002326.html Seeking clarity on Gmail "Access for less secure apps" setting for non XOAuth2 access]
 
==Bugs==
 
* [https://bugzilla.mozilla.org/show_bug.cgi?id=806760 TB16 Redownloads messages / Constantly bringing folders "up to date" / horrible IMAP performance] effects other email providers but is most frequently reported for Gmail.
* The [https://bugzilla.mozilla.org/show_bug.cgi?id=849540 Log in to Google Talk (XMPP) and Gmail (IMAP/SMTP) using OAuth] bug report doesn't mention that a commitment was made at the Toronto summit of 22 active contributors to Thunderbird in October 2014 to add OAuth support for IMAP accounts for Thunderbird 38, due in May 2015. [https://blog.mozilla.org/thunderbird/2014/11/thunderbird-reorganizes-at-2014-toronto-summit/]
* [https://bugzilla.mozilla.org/show_bug.cgi?id=1096894 Google Mail includes SeaMonkey Mail among "less secure apps"]
 
[[Category:E-mail account setup (Thunderbird)]]
[[Category:E-mail account setup (Thunderbird)]]
[[Category:Mail (Mozilla Suite)]]
[[Category:Mail (Mozilla Suite)]]
[[Category:IMAP]]
[[Category:IMAP]]

Revision as of 05:45, 23 March 2017

This article was written for Thunderbird but also applies to Mozilla Suite / SeaMonkey (though some menu sequences may differ).


Gmail provides free webmail accounts and POP, IMAP and SMTP servers. To add an account in Thunderbird you need to have a Gmail webmail account, create either a POP or IMAP account in Thunderbird and then enable it in Gmail settings using a browser.

You can create a new account by pressing the Add Mail Account button in Tools -> Account Settings -> Account Actions. All you need to know is your email address and password, it will configure the account settings for you. It defaults to a IMAP account but you can tell it to use a POP account instead using a radio button. If you don't want it to automatically configure your account press the "Manual Config" button in the second screen of "Mail Account Setup".

After you create the POP/IMAP account in Thunderbird enable using the POP or IMAP server with your account by:

  • Logging into your Gmail webmail account using a browser.
  • If you're using a POP account, click on "Settings -> Forwarding and POP/IMAP -> POP Download:" and choose either "Enable POP for all mail (even mail that's already been downloaded)" or "Enable POP only for mail that arrives from now on".
  • If you're using an IMAP account, click on "Settings -> Forwarding and POP/IMAP ->Enable IMAP"
  • Click the "Save Changes" button.

If you're using the same Gmail POP account with multiple email clients you need to enable recent mode in order to let each email client access all of the messages in that account. You can do that by replacing username@gmail.com with recent:username@gmail.com as the username in Tools -> Account Settings -> Server Settings.

Using OAuth2 for "secure authentication" will popup a window for your password using your systems default browser. It requires cookies to be enabled for google.com. It creates a token that will be used as if it was a stored password, by the password wizard. You can use a normal password instead for "secure authentication". However, unless you log into https://www.google.com/settings/security/lesssecureapps using a browser and select Allow to let less secure apps access your Google account Gmail may return an error when you try to login if you haven't had the Gmail account for at least 90 days. They have changed the error message several times. Currently it should look something like: "Sending of password for user XYZ did not succeed. Mail server pop.gmail.com responded: Web login required: https://support.google.com/mail/answer/78754". [1]

Using a password is just as secure as OAuth2, except for the possibility for somebody to use Tools -> Options -> Security -> Passwords -> Saved Passwords to view your saved password. This is really just an attempt to increase use of OAuth2, which supports their business plan by supporting logging into third party web sites such as Facebook or Twitter without exposing the users password. After a while some other email providers such as Yahoo have started doing the same thing to encourage people to use their apps or webmail (instead of a 3rd party email client).

If you get a popup later on after things have been working that you have to sign in to the Google account again, and then a "cookies disabled" web page you need to either enable cookies in Tools -> Options -> Privacy -> Web Content or add an exception for Google. [2]

The account wizard sometimes uses googlemail.com instead of gmail.com in the server names. They're equivalent. Gmail is rebranded as Google Mail in Germany, Austria and the United Kingdom.

If you use the Gmail SMTP server with a different account it will replace the From: address with your Gmail accounts email address unless you add the email address in the Gmail web page at Setting -> Accounts -> "Add another email address"

POP

  • Type: POP
  • Server Name: pop.gmail.com
  • User Name: Your FULL email address
  • Port: 995 (this should be automatically set when you select SSL/TLS)
  • Secure connection: SSL/TLS
  • Secure authentication: normal password. (OAuth2 is not supported by Gmail for POP accounts)

IMAP

  • Type: IMAP
  • Server Name: imap.gmail.com
  • User Name: Your FULL email address
  • Port: 993 (this should be automatically set when you select SSL)
  • Secure connection: SSL/TLS
  • Secure authentication: normal password or OAuth2 (recommended)

Set tools -> account settings -> server settings -> advanced -> IMAP server directory to [Gmail] to fix problems with how it lists folders in the folder pane.

SMTP

  • Server Name: smtp.gmail.com
  • Port: 587 (you could also use port 25 if your ISP doesn't block it)
  • Username: Your FULL email address
  • Secure connection: STARTTLS
  • Secure authentication: normal password or OAuth2 (recommended)

Don't configure Thunderbird to save a copy of any messages you send in tools -> account settings -> copies & folders. Gmail's SMTP server automatically saves a copy of any message you send in the Sent Items folder for you.

The SMTP server also supports using port 465 with SSL/TLS. [3]

Subscriptions

Subscriptions control whether an IMAP folder is visible in the folder pane (and any lists of folders). If it is cluttered with folders you don't normally use, you might want to hide some by unsubscribing them. You won't be notified of new mail in unsubscribed folders.

You can subscribe or unsubscribe a folder by:

  1. Right click on the Inbox in the folder pane.
  2. Select Subscribe in the context menu.
  3. Click on the '>' next to the Inbox to expand the folder list.
  4. Check any folders you want to make visible (subscribe), uncheck any you want to hide (unsubscribe).
  5. Press the OK button.

You can also use the Subscribe and Unsubscribe buttons in that menu. If View -> Folders is set to Unified instead of All, right click on the accounts name underneath the (unified) inbox at the top of the folder pane since that view displays the inbox folder differently.

All Mail

Gmail IMAP accounts have a All Mail folder which tracks every message. This is an artifact of how Gmail implemented labels, not a Thunderbird quirk. That folder is also used as the archive folder.

Tools -> Account Settings -> Gmail -> Synchronization & Storage -> Advanced is configured to keep a local copy of all IMAP folders on your hard disk. From a performance point of view you may wish to unsubscribe All Mail. (Note: Prior to version 17, being subscribed to All Mail folder doubles the amount of disk space used by Thunderbird to store your Gmail account ,and may cause some problems. Nowever, starting with version 17, with fixed bug 721316 only ONE copy of every newly downloaded message is kept on disk, so there is no need to unsubcribe from a storage point of view.) The safe way to unsubscribe and free the related disk space is:

  1. Uncheck it in Synchronization & Storage -> Advanced
  2. Unsubscribe it (see above)
  3. Press the "show folder" button in Help -> Troubleshooting Information to view the profile directory using Windows Explorer.
  4. Exit Thunderbird.
  5. Go to ..\ImapMail\imap.gmail.com (or ..\ImapMail\imap.googlemail.com if you use the googlemail mail server)
  6. Delete both "All Mail." and "All Mail.msf".
  7. Restart Thunderbird.

If you have multiple Gmail IMAP accounts some of the directories will have a numeric prefix such as imap.gmail-1.com. Look at the "Local Directory" setting at the bottom of the Tools -> Account Settings -> account_name -> Server Settings (by the browse button) to find the name of that account's directory.

Less Secure Apps

Google is trying to push email clients to either use two factor authentication or OAuth2, rather than simply logging in with POP/IMAP/SMTP using your username/password. They are doing this by gradually increasing the number of times they prevent a email client from logging in with a password, claiming they did that because the email client was not secure enough. This is not limited to Thunderbird, it occurs with almost any email client. It has nothing to do with whether the email client is using the latest version of SSL/TLS or Perfect Forward Secrecy, its strictly an authentication issue. If you run into this your Gmail account may either appear to hang, you get some type of “Password incorrect” error or you get a error message roughly like:

We recently blocked a sign-in attempt to your Google Account [XXXX@gmail.com]. If this was you you can switch to an app made by Google such as Gmail to access your account (recommended) or change your settings at https://www.google.com/settings/security/lesssecureapps so that your account is no longer protected by modern security standards. To learn more, see https://support.google.com/accounts/answer/6009563

If you keep using the same TCP-IP address for your PC/laptop you are usually okay. If you run into this problem log into https://www.google.com/settings/security/lesssecureapps using a browser and select “Allow” to let less secure apps access your Google account. [4]

Why does Google call Thunderbird “less secure”? has some useful comments such as "OAuth is more secure because it only need to decrypt the keyring (i.e. passwords in plain text) for the very short duration while you authorize the mail agent, this is true whether you do the authentication in browser or if the mail software itself supports inbuilt OAuth authorization." Bypassing Googles two factor authentication and Google-jacking: A review of Google's 2-Factor Authentication discusses some of the risks of how they implemented two factor authentication.

Troubleshooting and Gmail quirks

Gmail treats POP and IMAP messages individually and not as a threaded conversation.

Compatibility

  • \Recent flags on messages are not supported. The \Answered flag is not preserved when a message is moved or a label is added to the message [5]
  • Only the From, CC, BCC, To, and Subject headers can be searched. All searches are assumed to be words.
  • If you exceed 15 connections per account you will get either a "Too many simultaneous connections" or a "Account exceeded command or bandwidth limits" error. Typically, an additional connection needed for each folder that you automatically check for new mail for, so this might limit how many folders you can enable for "when getting new mail for this account, always check this folder" in folder properties. This error can also cause you to be blocked from Gmail for 24 hours. [6] [7]

Labels

The IMAP folders correspond to the labels in Gmail's webmail. IMAP folder hierarchy is represented by "/" in Gmail's label. e.g. IMAP subfolder XYZ under ABC is mapped to label of ABC/XYZ(maximum length=40 bytes). However, mapping of IMAP folder to Gmail's folder or label at Web interface is special on some special folders.

  • IMAP folder of [Gmail]/All Mail, [Gmail]/Drafts, [Gmail]/Sent Mail, [Gmail]/Spam, [Gmail]/Starred, [Gmail]/Trash
    => Gmail's folder of All Mail, Drafts, Sent mail, Spam, Starred, Trash.
  • Other IMAP folders such as XYZ under [Gmail]
    => Gmail's label of [Gmail]/XYZ.
  • Root level IMAP folder of Drafts, Sent, Trash
    => Gmail's label of [Imap]/Drafts, [Imap]/Sent, [Imap]/Trash.

If you look at the All Mail folder([Gmail]/All Mail of IMAP) using Gmails webmail it will label any IMAP messages with the name of the folder. If you delete a message in Thunderbird it simply removes that folder's label from the message. Compacting the folder doesn't remove the message from the All Mail folder([Gmail]/All Mail of IMAP). You need to move it to the Trash or Spam folder([Gmail]/All Mail or [Gmail]/Spam of IMAP) to delete the message from all folders. It's not clear yet if this is also true for Message aging. Moving back of mail in [Gmail]/All Mail of IMAP to any IMAP mail folder(except [Gmail]/Spam) restores all Gmail's label.

A single copy of each message is stored in the account, and if the messages has multiple labels there are pointers to that copy, a change introduced in version 17.0.2 by bug 721316. (Prior to version 17.0.2 a copy of a message is stored for each label. That means if you assign two labels to a message and star it using Gmails webmail it has a copy in two folders named after the label, the All Mail folder, and the Starred folder.) If you copy a message to multiple remote folders (using Thunderbird) it will be marked with the corresponding labels when viewed using Gmail webmail.

If you move a message into the Spam folder, it is treated the same as if you had reported it in Gmail webmail using 'Report Spam'. See How do actions sync in IMAP? on Gmails web site for more information on how it maps things.

Gmail recommends that you do not use [Gmail]/Trash as your Trash folder since Gmail only keeps a single copy of a message with multiple labels. If you delete a message that way you're also telling it to delete the same message from any other folder (label) that has that message. [8][9] Gmail recommends not making Thunderbird move deleted mail into any folder and instead choose "Just mark it as deleted" from "When I delete a message" in Account Settings -> Server Settings.

Problems

  • Gmail imposes an unspecified limit on how many messages you can upload during a short amount of time. If you exceed it, you get temporarily locked out of the account. It is not clear yet whether this is actually a bandwidth limit. A similar limit has been reported in the forums for downloading messages. This was primarily observed when offline folders are enabled. In those cases, a large amount of messages was downloaded on initial synchronization or when reindexing an IMAP folder.
  • Gmail periodically re-indexs your mailbox. If you're using a IMAP server its possible deleted messages from your Sent Mail folder might get resurrected when that happens. You can prevent that by setting "When a message is marked as deleted and expunged from the last visible IMAP folder:" to "Immediately delete the message forever" in Gmail webmail's "Forwarding and POP/IMAP" settings. [10]
  • If large messages or attachments are truncated, set mail.server.default.fetch_by_chunks = false to work around a size bug in Gmail.
  • Gmail has problems with non-ASCII characters in headers. This might occur if they're used in a recipient's email address, folder names or tags. To work around the bugs in Gmail header fields, go to "Tools -> Options -> Advanced -> General -> Config Editor (button)", right-click anywhere in the list of preferences, select New, select Boolean, copy-paste mail.imap.use_envelope_cmd, and set it to true. [11] [12]
  • The Gmail list of known IMAP issues mentions that the "All Mail" folder can have well over 100,000 messages and that some email clients may crash if they try to process a folder with that many messages. Thunderbird doesn't have any known limit on the maximum number of messages in a folder, but most of the attention has been on the maximum size of a folder.
  • This forum thread discusses some more quirks. Please check bugs listed in the dependency tree for bug 402793(meta bug) with "Show Resolved" before opening a bug relevant to Gmail IMAP at bugzilla.mozilla.org.
  • If you send a message from your Gmail account to the same Gmail account in Thunderbird, that message will not be downloaded into Thunderbird. The message will, however, appear in your Gmail Inbox if you log into your account using the Gmail web interface. This is not a bug in Thunderbird; it is a quirk in the way Gmail implements POP. If you use IMAP, an e-mail sent to yourself shows up in Inbox, [Gmail]All Mail, and [Gmail]/Sent Mail folders.
  • Gmail's SMTP server ignores whatever "From:" address you might specify using multiple identity support by default and uses your Gmail authenticated address instead. You have to register any other address using Gmail's web interface at Setting -> Accounts -> "Add another email address" to enable it as "From:" address. Your authenticated Gmail address is still added as a secondary "Sender:" header.
  • If Thunderbird refuses to use the correct outgoing (SMTP) server, see the "Troubleshooting" section in this article.
  • The Gmail SMTP server now officially supports both STARTTLS (port 587) and SSL/TLS (port 465). Note: Thunderbird 3.0 renamed TLS to STARTTLS and SSL to SSL/TLS.
  • Gmail scans attachments for viruses and blocks any that it thinks contains executables. This includes .zip files. You can work around this by changing the filenames to use file extensions it doesn't recognize. However, since that violates their policies you could potentially lose your Gmail account. A better solution might be to use a free file hosting site such as RapidShare, MegaUpload or YouSendit and send a link to the file instead.

Disposable addresses

Gmail supports plus-addressing, a useful way to create a disposable email address. Let's say your email address is JohnSmith@gmail.com and you need to give the xyzzy website an email address. If you give them JohnSmith+xyzzy@gmail.com, it will still be delivered to your inbox, despite the To: header having an extra "+xyzzy". If somebody starts sending spam to that email address, you could create a message filter that tests for xyzzy in the To: header and automatically delete (or move to the Junk mail folder) those messages when checking for new mail. Some email systems violate RFC 2822 and won't send a message using plus addressing, but it is normally not a problem.

Mail fetcher

Gmail supports a way to periodically fetch email from up to five POP accounts and merge them into your inbox. The POP accounts could be provided by Gmail or another email provider. It works with Thunderbird, but you have to configure mail fetcherusing Gmail webmail.

Two step verification

The Google Account help advocates using two step authentication. That sends a code (a minimum of once a month but ideally every time you log in) to your cell phone that you need to enter when logging in using a browser. However applications such as email clients can't do that. If you configure two step verification you need to create an application specific password for Thunderbird that you use instead of the normal password. The application specific password doesn't change when a new code is sent to your cell phone. If you created a application specific password, you use it for a while, and later on its rejected, forcing you to create another one, try deleting all google cookies using Tools -> Options -> Privacy -> Show Cookies, exit and restart Thunderbird. [13]

Two step verification is not needed, and not recommended. Use a strong password, and don't use the same password with other email providers/web sites, instead. However, if you have another email account it is a good idea to set a recovery email address in case you ever forget/lose your password.

Synchronizing contacts

Gmail supports the CardDAV protocol (an address book client/server protocol designed to allow users to access and share contact data on a server). Currently the SoGo connector add-on is the best way to add CardDav support to Thunderbird. However, it has a reputation as being buggy and having poor support. There is a bug report requesting built-in support for CardDAV. The address book is being completely redesigned and will include support for multiple contact providers. Based on this blog post it looks like that will eventually include support for CardDAV. See this forum thread for information on other alternatives.

The most popular solution is to use an add-on such as Zindus or Google Contacts to synchronize your address book with Google Contacts.

Gmail does not provide a LDAP server. LDAP is another protocol to access contact data. Thunderbird has built-in support for creating an address book that uses a LDAP server, but no support for modifying its contacts. You used to be able to use GCALDaemon to provide a the equivalent of a Gmail LDAP server, but it used the deprecated GData API, and doesn't work anymore.

Variants

Most people use the free version of Gmail. There is a commercial version of Gmail called G Suite. It used to be called "Google Apps for Your Domain". The main difference is that it has higher limits and is designed for companies that want to use their own domain in the email address. There is also another free version of Gmail called Inbox by Gmail that has a alternative user interface that has more of a focus on automatically classifying the content. Its available as a iOS or Android app or webmail (https://inbox.google.com/) . The app appears to be just another front end to a Gmail account, using the same mail servers.

See also

External links

Bugs