- Install fetchmail
apt-get install fetchmail
Let’s assume your name is John Doe and your user on your local Linux box is called john, his email is firstname.lastname@example.org, so his provider’s pop3 box is pop3.provider.com and his password for fetching his email from his provider is my-secret-password.
- So create/edit
# get mail from provider
mda "/usr/sbin/cyrdeliver -a -m john"
Remove ‘keep‘ if all went well, and your mail server is up and running, else you’ll eventually loose email. If you have multiple email accounts, simply append them.
- now it’s time for a cronjob. Perform a
and insert this line:
#*/15 * * * * fetchmail -f /home/john/.fetchmailrc >> /dev/null 2>&1
‘*/15’ means your provider will be asked every 15 minutes for new mails. Adjust this value to your needs. Please do this cronjob step at last. It’s actually a silly idea to start with the fetchmail documentation, because fetchmail can’t deliver anything at this moment. Comment out the leading ‘#‘ if all is finished and running. I will mention that later again.