Collect mails from other accounts
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.
To install what we will need, run
yast -i procmail yast -i fetchmail
To configure it, use the file .fetchmailrc in your home directory. It should look like this:
poll pop.provider.net user "firstname.lastname@example.org" pass "password" is localuser mda "/usr/bin/procmail -f fetchmail"
- localuser with your local user on your Linux box.
- pop.provider.net with your provider's pop server name.
- email@example.com with your mail address
- password with your password at the provider
Then set the permissions for the file
chmod 710 .fetchmailrc
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:
LOGNAME=/var/log/procmail DROPPRIVS=yes DEFAULT=$HOME/Maildir/ MAILDIR=$HOME/Maildir/
echo "this should be in your mailbox" | procmail
grep "this should be in your mailbox" ~/Maildir/new/*
must deliver a match.
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 pop.provider.net
Replace pop.provider.net by your provider's pop mail server.
fetchmail -p IMAP -v imap.provider.net
Replace imap.provider.net by your provider's imap mail server.