You will have to download all the yahoo mail in thunderbird then upload it to gmail. So this may take awhile. Hope ya got high speed internet.
Get the webmail and yahoo add-on for thunderbird at
http://webmail.movdev.org then make a pop yahoo account in thunderbord and make sure under server settings you check mark leave messages on server.
In yahoo mail you will have to move all the sent items in a folder. You can name it Sent backup or something.
In thunderbird you will have to add the folder by clicking on tools and add-ons then click options for the webmail - yahoo addon and click the pop tab then where it says download folder click add. Also under the mode tab you should use production website(Yahoo mail classic) instead of beta website (New Yahoo Mail). Also under the pop tab select mark emails as read on server and download unread mail only. Then go in yahoo mail and mark all your e-mail as unread by logging in the new yahoo mail and selecting the check mark all e-mails and selecting unread then switch back to yahoo mail classic.
You can either first download the inbox and upload to gmail then add the sent backup folder explained above and then download the sent mail and upload to gmail in the proper folder/label. Or download the inbox and sent mail and use filters to direct to the proper folders/labels for hand free operation. Whatever you feel good with.
You can set thunderbird to download and upload your e-mails on it's own. Just click tools and message filters. Where it says filters for. Select the yahoo account and click new.
Name the filter something like Yahoo inbox to gmail. Then for incoming messages: select match all messages. Now for perform these actions to select move message to and then select the the label/folder you made like Yahoo mail inbox for your pop3 gmail account and click the + and ok.
You can also then download your inbox and sent mail at once and set the filters to separate them theres a few ways to do it. Like make a new filter for yahoo account and name it sent mail and select match all of the following then for incoming messages that: select from then is and type in the yahoo e-mail address of that account then click the + and for perform these actions: select move messages to then select the sent folder of the yahoo account then click the + and ok.
Or when creating a new filter where it says filters for: select the gmail account then click new. Name the filter sent yahoo mail or whatever and then for incoming messages that: select match all of the following then select from and is then the e-mail of the yahoo account and click the +. Then for perform these actions: select move messages to and select the yahoo sent mail label/folder in your gmail account.
Pick whatever works best for you. Make sure to do it before you download the email if you want it to automatically download and upload the yahoo account otherwise download it then after making the filters select under tools run filters on folder which then you have to select the folders you make the filters for then do it which is allot slower but you can choose if you want to download it on your computer and then upload it or set it up download and upload automatically.
You might need to go into the thunderbird options and click advanced and then network and diskspace and set the connection timeout to a large number like 99999.
After downloading your e-mail. You should upload it through gmails pop and not imap. So enable pop in gmail and setup a pop gmail account in thunder bird. Then make some folders which will be labels in gmail for yahoo mail inbox and yahoo mail sent if you like.
Once your finished check the number of yahoo e-mails in the yahoo account to make sure you downloaded and uploaded them all. You should with no problem and they should be marked as read. Unless you got new mail of course. Once done you can continue to let thunderbird to download and upload yahoo mails to gmail or delete all the yahoo mails and or the yahoo mail account.
I'd stick with the webmail thunderbird add-on but if you want some other options you can try Ypops or FreePOPs.
http://ypopsemail.com/ ,
http://www.freepops.org/en/
Good luck!
When on the go and you have to check your e-mail in a web browser you can set yahoo mail to retrieve your pop gmail. Why do this? Well the new yahoo mail does win out on best webmail look. It does look allot better than gmails webmail interface and you can send e-mails to multiple contacts in the address book and such. Unlike gmails webmail interface that only lets you type in the accounts you want which makes it annoying if your sending an e-mail to everyone. Anyways just an idea.
Gmail is great but you should also give AOL/AIM mail a try. I know AOL has been givin crap in the past but there free e-mail service offers about the same as gmail with pop3 and imap support as well as unlimited space you can also send attachments up to 5gbs:
http://journals.aol.com/websui...oductinsider/#Entry352 and you can choose your own free mail domain:
https://domains.aol.com/person...d=AOLCMP00300000000130. It also has a nice webmail interface besides the big banner ad space but you can also use it as a back up for gmail and vice versa as both offer free mail forwarding as well. You can read the review here as well reviews to the top free email providers:
http://email.about.com/od/free...iews/tp/free_email.htm
Need any further help or questions feel free to ask.