Outils personnels

Fetchmail - installation

De wikiGite

CentOS

yum install fetchmail

le paquet n'installe pas pas d'init script ! Créer /etc/init.d/fetchmail : un exemple d'init script

chmod 755 /etc/init.d/fetchmail

créer /etc/fetchmailrc

defaults
proto pop3
set logfile "/var/log/fetchmaillog"
set daemon 300

# Fetchmail config (garde les mails ("keep") sur le serveur pop)
poll pop.popdomain.fr with proto POP3
   user "user@popdomain.fr" with password "monMotDePasse" is user1@mondomaine.fr here keep
   smtphost "localhost" smtpname "user1@mondomaine.fr"

Tester :

fetchmail -f /etc/fetchmailrc

Si les mails sont bien ramenés, tuer le processus lancé ci-dessus

killall fetchmail

puis

chkconfig --add fetchmail
service fetchmail start

Debian

Le fichier de config doit obligatoirement être /etc/fetchmailrc

Mettre START_DAEMON à yes dans /etc/default/fetchmail

Démarrer le démon, si Debian il est déjà dans /etc/rc2.d

Exemple de config :

# Fetchmail config
poll mail.example.net with proto POP3
        user "user1@example.net" with password "mot_de_passe" is user1 here
poll mail.example.net with proto POP3
        user "user2@example.net" with password "mot_de_passe" is user1 here
poll pop.free.fr with proto POP3
      user "userFree@free.fr" there with password "mot_de_passe" is user1 here