During the past 10 years I collected several private e-mail accounts, all POP3 ones. Each time I had to use a brand-new computer I also had to move all mailboxes saved locally :-(
After using Microsoft Outlook Express for a while, I started using Thunderbird client.
Later I started using a Gmail account (could you believe it, a friend had to invite me!) and set it up to collect all other accounts mailboxes and label messages according to the account name.
This afternoon I realized I still had Thunderbird installed on my pc, with many messages downloaded via POP3. What to do? Delete all messages or try moving them to Gmail? I decided to move all messages.
I added an IMAP account to Thunderbird to access my Gmail mailbox, as described here: Gmail labels are shown as IMAP folders.
To move my messages from Thunderbird local folders to Gmail, I simply had to drag&drop messages from any local folder to a specific Gmail "folder". Done!
By the way, that is the same technique I used when I had to migrate a small company mailboxes from Outlook Express to Notes R7, using the standard migration tool...
In case you use the mail from Google for Apps, there's a nice utility, Google Email Uploader, that helps you to move messages from Outlook, Outlook Express and Thunderbird.
Unfortunately it does not work when the destination mailbox is a "consumer" Gmail account.