Today I opened Thunderbird on my Linux (I usually boot into Windows because of my job) and found that the profile was too out-of-dated that it still check my Gmail account via POP3. I have it reconfigured and planed to write a walk-through guide to share here. However, I found someone has already done so long ago, and has written exactly what I planed to, so I'd better not repeating again.
The official Gmail guide mentioned clearly the steps to make it works, and you may want to have some tweak to make it work better. Most of the settings are obvious in the graphical user interface, the only key point (may be) there is how to configure Thunderbird to use Gmail's original trash folder instead of creating an brand new [IMAP]\Trash label. Check out Ramesh's blog post for instructions. Just a point to add, indeed you don't need to edit the pref.js yourself, you may use the Config editor (about:config) instead:
- Go to Edit -> Preferences -> Advanced -> General -> Config Editor.
- You need to find out the server ID. You can type hostname in the filter box and look for imap.gmail.com in the values, and the server ID is part of the corresponding preference name (e.g. server9 if your the name is mail.server.server9.hostname).
- Then right click on the preference panel, create a new string (New -> String), enter mail.server.server#.trash_folder_name (# is the server ID you just found out) for name and [Gmail]\Trash for value.
- Close the Config editor and restart Thunderbird (you may need to restart a few times before the GUI reflects the changes). Done~
FYI, here is the official MozillaZine KB article for changing the trash folder in Thunderbird.
BTW, if you are configuring for your Google Apps email account, you may not be able to change the trash folder. I didn't investigate the reason behind, that's just my observation.