Go into Gmail (Web-based) then click on settings>Pop/Forwarding>Enable pop for all mail (even mail that has already been downloaded.)
Next. Go to Thunderbird click account settings under tools add account, then type in:
Follow the set up guide:
Incoming Server: pop.gmail.com
Outgoing:SMPT: gmail.com (If asked).
Check the box next to 'Use secure connection (SSL),' and ensure that '995' appears in the 'Port:' field.
If you wish to leave a copy off the mail on the server check Leave message on server in Server settings.
Remember SSL needs to be ticked on port 995.
And you can set a time for your account to be checked.
Yahoo can be a bit more complecated Well all i need to know is the end prefix of your yahoo address ...........@yahoo.???
Hope this Helps