Collect mails from other accounts

From Linuxintro

This article shows how you can collect e-mails from your accounts in the web to your local computer. It has been tested with SUSE Linux 10.3 but should work for other configurations as well.

To collect mails from pop accounts, we use fetchmail.

Install fetchmail

To install what we will need, run

yast -i procmail
yast -i fetchmail

Configure fetchmail

To configure it, use the file .fetchmailrc in your home directory. It should look like this:

        user ""
        pass "password"
        is localuser
        mda "/usr/bin/procmail -f fetchmail"


  • localuser with your local user on your Linux box.
  • with your provider's pop server name.
  • with your mail address
  • password with your password at the provider

Then set the permissions for the file

chmod 710 .fetchmailrc

Configure procmail

Procmail is a mail delivery agent MDA. It works together with the MTA. An MTA can either store its mails on its own or hand the mails over to an MDA. The MDA can then call e.g. spam checkers before delivering (or not delivering) the mail. Write a file /etc/procmailrc with the following content:


Test procmail:

echo "this should be in your mailbox" | procmail


grep "this should be in your mailbox" ~/Maildir/new/*

must deliver a match.

Call fetchmail

You need to know if your provider has a POP or an IMAP server for you. Or you need to try it out.

fetchmail -p POP3 -v

Replace by your provider's pop mail server.

fetchmail -p IMAP -v

Replace by your provider's imap mail server.