From LQWiki
Jump to navigation Jump to search

Fetchmail is an open source application licensed under the GNU GPL. It's purpose is to retrieve emails from a foreign server, and forward them to another local or foreign server.

For example: You have two mail accounts on two mail servers. You want to implement webmail on your workstation to read all these mails in your browser. Then use fetchmail on your workstation, it can retrieve your POP3 email from both your mail accounts.

Fetchmail supports all remote mail protocols : [POP2, POP3, RPOP, APOP, KPOP, all flavors of IMAP, and ESMTP ETRN. It can even support IPv6 and IPSEC.


Install cyrus, fetchmail and postfix from your distribution. Start your smtp service on your desktop:

/etc/init.d/postfix start

Tell fetchmail to get your mail from yourmailserver.de to your desktop:

fetchmail mx.yourmailserver.de

Start your pop/imap server on your desktop:

/etc/init.d/cyrus start

Now you can use your desktop as mail server using mutt.

Configure your Fetchmail

In your home folder, find .fetchmailrc. An example configuration is:

poll mail.myServer.de
        user "myName"
        pass "myPassWord"
 mda '/usr/bin/procmail -f fetchmail'

Everytime you start fetchmail from now, your mail gets fetched from mail.myServer.de, for name "myName" with password "myPassWord".

See also