Login to your Gmail account, and click on the “settings” button located near the the top right corner, next click on “Forwarding and POP/IMAP” link.
Click on “Enable IMAP” radio button., If everything is correctly configured, it should say IMAP is enabled in Green.
Next, open your Thunderbird installation on your Windows/Linux box. If you have no accounts configured, you will be prompted with a wizard, if not, click “Edit > Account Settings > Account Actions > Add Account”
Enter your name, Email address and your password. Thunderbird will do the lookup for you and setup everything automatically. Click on “Create Account” and your Gmail in Thunderbird setup will be complete.
Let me know if you had any problems….