Linux: To fetch mails from your provider with fetchmail

If a user like to transfer automatically his e-mails from his Internet mail account to conversations ,  setup the program fetchmail. This program polls for mails at a specific interval and place them in the  conversations database .

Overview:

•First you create the file .fetchmailrc. You can do this manually or via the graphical interface fetchmailconf, only available for a few Linux systems.
•Then you have to test the transfer.
•As soon as this works faultlessly, you will configure the file fetchmail as a service.

Create .fetchmailrc.

pfeilLogin as user root on the Linux computer on which fetchmail runs.

pfeilCreate the file .fetchmailrc in the directory home .

The sample file shows only the most important entries:

 
set bouncemail
set no spambounce
set properties " "
set daemon seconds
poll internetprovider via pop3server
with proto POP3
   user 'username1@provider' there with password 'password' is 'username1'  here
options
       user 'username2@provider' there with password 'password' is 'username2'  here
options
       user 'username3@provider' there with password 'password' is 'username3'  here
options

set daemon seconds: You can type in the interval in which new mails are polled, e. g. 120 (seconds)

poll internetprovider via pop3server:
internetprovider: e. g. online.de
pop3server: name of the POP3 server, e. g. pop.1und1.de

Internet mail account, password and conversations account for every user are listed in the lower part.
username1@provider: Internet mail account
password: Internet mail account password
username1: conversations account; (see conversations administrator, "Create User", "Name" (not  "Description"!)

options: various options can be found in the manual "pages" of fetchmail

pfeilSave .fetchmailrc

Test .fetchmailrc.

pfeilEnter fetchmail -v.

pfeilTest until the transfer works successfully.

Configure .fetchmailrc as a service.

pfeilCopy the file .fetchmailrc into the directory etc with the command
cp /home/.fetchmailrc/ etc/fetchmailrc

pfeilEnter the command
/etc/init.d/fetchmail start

You are asked whether the Daemon shall be installed.

pfeilYou have to agree.