Here is a tutorial on using thunderbird:
ehow.com
This blog
entry has a tutorial on using
getmail, which seems to be the more linux-friendly way to do it.
Google has a group called the Data Liberation Front that has some details on getting your data out of
GMail and other google apps.
Good luck