Fetchmail
From Gentoo Linux Wiki
This article is still a Stub. You can help Gentoo-Wiki by expanding it.
Contents |
[edit] Install
# emerge fetchmail # nano -w /etc/fetchmailrc
[edit] Configure
| File: /etc/fetchmailrc |
################## testuser@testsite1.ath.cx ############################### poll pop.name.mail.domain proto pop3 user "testuser" password "******" is "testuser@testsite1.ath.cx" here poll pop.gmail.com port 995 proto pop3 user "testuser@gmail.com" password "*****" ssl is "testuser@testsite1.ath.cx" here ################################################################################## |
# chmod 0600 /etc/fetchmailrc # nano -w /etc/conf.d/fetchmail
| File: /etc/conf.d/fetchmail |
# Polling frequency in seconds # (fetchmail will daemonize and check for new mail at this interval) polling_period="60" |
[edit] procmail
This is an example configuration:
poll pop.correo.yahoo.es protocol POP3 service 110
user "username" password "password" fetchall
mda "/usr/bin/procmail -a YAHOO -d %T"
poll pop.gmail.com protocol POP3 service 995
user "username" password "password"
fetchall ssl
mda "/usr/bin/procmail -a GMAIL -d %T"
poll imap.uab.es protocol IMAP service 143
user "username" password "password" fetchall
mda "/usr/bin/procmail -a UAB -d %T
In this example the -a flag passes its value to procmail (variable $1) in order to recognise from which mail server the messages come.
[edit] Run
# /etc/init.d/fetchmail start # rc-update add fetchmail default
