1. mail.check_all_imap_folders_for_new -> change to true
2. mail.server.serverX.trash_folder_name (create string if not set) -> [Gmail]/Trash
3. Tools -> Account Settings -> Server Settings -> Advanced…. -> Maximum number of server connections to cache -> Set to 2 (if you have multiple devices or people trying to use one account such as sales, purchasing, etc or have lots of gadgets like blackberry/iphone.
4. Tools -> Accounts Settings -> Server Settings -> Copies & Folders -> Check place a copy in: and choose other: Sent mail on accountname. If using a group account where you want others to see your responses also click place replies in the folder of the message being replied to.
5. Tools -> Accounts Settings -> Server Settings -> Composition & Addressing -> Automatically quote the original message then start above the quote, and place signature below my reply. Once this is set, click ok and go to Tools -> options -> advanced -> config editor -> type in sig_bottom and change all values to false if you want your signature to be at the top. Now restart thunderbird.
5. Add identities as needed, attach signatures for each identity. Be sure the base idenity has the above settings already set so you won’t need to repeat the copies & folders or composition & addressing features. Once done with setting the identities click ok and go to Tools -> options -> advanced -> config editor -> type in sig_bottom and change all values to false if you want your signature to be at the top. Now restart thunderbird.
6. Be certain you have the right smtp gmail server for each account so your sending credentials are accurate. I manage more than one account and found the server assignments for multiple identities to all be set to the default smtp server so every identity must be properly set. To check, go to Tools -> options -> advanced -> config editor -> type in smtpserver and look at the assignments. You can validate this secondarily by looking at mail.identity.idx iterating the numbers for the proper assignments.
7. Tools -> Account Settings -> Junk Settings -> Uncheck the enable adaptive junk mail controls for this account as google should handle this for you.
Important NOTE: After ANY changes to identities you must go back to Tools -> options -> advanced -> config editor -> type in sig_bottom and change all values to false if you want your signature to be at the top. This is a bug the Thunderbird people deny exists and frustrates our admins because any time a change is written to an identity this flag is reset to true regardless of the state chosen in the gui menu.
Here are some more references:
http://www.howtogeek.com/howto/internet/setting-up-gmail-imap-support-in-thunderbird-2x/
http://lifehacker.com/software/geek-to-live/turn-thunderbird-into-the-ultimate-gmail-imap-client-314574.php
http://mail.google.com/support/bin/answer.py?hl=en&answer=78892
https://addons.mozilla.org/en-US/thunderbird/addon/6381
EDIT:
Here are some additional nice notes for gmail with thunderbird ( http://mail.google.com/support/bin/answer.py?answer=78892# ):
From the Tools menu, select Account Settings and highlight your Gmail address.1. On the Server Settings tab:
Check for new messages at startup > checked
Check for new messages every 10 minutes > checked
[EDITOR NOTE] I recommend 15 minutes and I move our trash to the trash folder as setup in the first part of this post
When I delete a message > Mark it as deleted
Clean up (“Expunge”) Inbox on Exit > do NOT check
Empty Trash on Exit > do NOT check2. On the Copies & Folders tab in the When sending messages, automatically section:
Place a copy in > do NOT check
3. On the Copies & Folders tab in the Drafts and Templates section:
Keep message drafts in > Other
Other > [Your Gmail address] > [Gmail] > Drafts4. On the Junk Settings tab
Enable adaptive junk mail controls > do NOT check
5. Click OK to save and close your account settings.
If you’d like to to further enhance your IMAP experience, please carefully follow these additional steps:
In the ‘Tools’ menu, open Options.
On the ‘Advanced’ tab, open the General section.
Click the Config Editor button.
In the ‘Filter’ box, type ‘browser.cache.memory.capacity’
Double-click on the browser.cache.memory.capacity entry to edit its value.
Change the value to ‘30720’ and click OK.
Delete the text in the ‘Filter’ box and type ‘mail.server.default.fetch_by_chunks’
Double-click on the mail.server.default.fetch_by_chunks entry to set its value to false.
[EDITOR NOTE] I recommend searching for ‘fetch_by_chunks’ and changing all servers to false
Close the ‘about:config’ window and then close ‘Options’ by clicking OK.