As gmail has some mail lost issues early this week, I feel it is not safe to put all my mail in one gmail account. I find a little tool in Linux can help me to back up all my mails to my local driver, called fetchmail.
Here is the manual page of fetchmail http://fetchmail.berlios.de/fetchmail-man.html, thanks to Ubuntu, the installation is simple, use command line:
sudo apt-get install fetchmail
make sure you have the mail server installed, otherwise, run
sudo apt-get install heirloom-mailx
sudo apt-get install Postfix
using the Internet and Smart host option
Then, you should create a control file for Fetchmail, in your home/username folder, create a file called “.fetchmailrc”, put these words in it,
poll pop.gmail.com with proto pop3 and options no dns
user “emailaddress” there has password “password” is yourlocalname here options ssl
I use pop.gmail.com because I want to back up my gmail account, it can be replaced by any other mail service. Replace emailaddress with your email account, password with your password, and yourlocalname with your local machine user name.
Then, use the following command to set up a correct permission.
chmod 710 .fetchmailrc
To run the fetchmail, use command
The fetched mail will be in your /var/spool/mail folder, it can also be import into some mail software like Evolution.