The fetchmail utility can be used to automatically and securely retrieve e-mail from a Gmail account to a given mailbox under your csoft account.
Your Gmail account must be first configured to allow POP3 access. Log in to your Gmail account, click on the "Options" icon at the upper right of the screen and select "Mail settings". Click on the "Forwarding and POP/IMAP" tab and under the "POP Download" section, select one of the "Enable POP" options. You can choose to keep, delete, archive or mark as read the messages that have been accessed by POP.
Open up the file ~/.fetchmailrc in your preferred text editor. Replace firstname.lastname@example.org for the local e-mail address you wish to receive the Gmail messages. Substitute email@example.com and secret for your Gmail address and password:
set postmaster "firstname.lastname@example.org" poll pop.gmail.com with proto POP3 user 'email@example.com' there with password 'secret' is firstname.lastname@example.org here options ssl
log onto your csoft shell account using SSH. You can then run a verbose fetchmail test from the command-line like so:
$ fetchmail -d0 -vk pop.gmail.com
If all is working fine, open up your crontab:
$ crontab -e
and add the line:
*/15 * * * * fetchmail -s
This directive specifies to look for new mail every 15 minutes. You
can also substitute the
*/15 * * * * part for
Please make sure not to use an interval smaller than 5 minutes.
Optionally, you can set up error reporting by adding a
line to your crontab, so that any possible error message emitted by fetchmail will be e-mailed
For more information on the crontab file format, refer to crontab(5).