Search:  
Gentoo Wiki

Fetchmail

This article is still a Stub. You can help Gentoo-Wiki by expanding it.

Contents

Install

# emerge fetchmail
# nano -w /etc/fetchmailrc

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"

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.

Run

# /etc/init.d/fetchmail start
# rc-update add fetchmail default

See also

Retrieved from "http://www.gentoo-wiki.info/Fetchmail"

Last modified: Mon, 08 Sep 2008 05:28:00 +0000 Hits: 1,221