Re: Fetchmail, Procmail and multiple Email accounts
On Wed, Nov 08, 2000 at 06:06:13PM -0500, Jim Lisi wrote:
> Note: Please CC me, I am having problems with the email addrs subsribed
> to the list
>
> I am trying to setup fetchmail and procmail so that I can get mail from
> two email accounts
> and diliver that to my debian box into to subfolders under ~/Mail.
>
> exp.
> fetchmail user@abc.tld -> user@local via exim
> fetchmail user@xyz.tld -> user@local via exim
>
> procmail for user@local
> send mail for user@abc.tld to ~/Mail/abc/inbox
> send mail for user@xyz.tld to ~/Mail/xyz/inbox
>
1) Create a file ~/.fetchmailrc with the following contents:
poll mail.abc.tld
protocol pop3
user user
pass password_for_abc.tld_account
mda "formail -s procmail"
keep;
poll mail.xyz.tld
protocol pop3
user user
pass password_for_xyz.tld_account
mda "formail -s procmail"
keep;
2) Create a file ~/inbox :
> echo -n > ~/inbox
3) Create a ~/.procmailrc with the followin contents:
PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin
MAILDIR=$HOME/Mail
DEFAULT=$MAILDIR/Inbox
LOGFILE=$MAILDIR/.procmail.log
:0:
* ^To.*user@xyz.tld*
* ^CC.*user@xyz.tld*
* ^BCC.*user@xyz.tld*
xyz/inbox
:0:
* ^To.*user@abc.tdl*
* ^CC.*user@abc.tdl*
* ^BCC.*user@abc.tdl*
abc/inbox
4) Test the configuration (you can see the procmail activity in the file
~/Mail/.procmail.log
5) When the thing is working you can remove the "keep" key in the
~/.fetchmailrc file.
6) To understand what is happening read the files under /usr/share/doc/procmail
and /usr/share/doc/fetchmail, and read man fetchmail, man procmail, man
procmailrc and man procmailex .
Good Luck!
--
______________________________________________________
______ _____________
Marcelo Ramos | \/ __ |
Debian 2.2 GNU/Linux 2.2.17 | |_/ /
Linux registered user #118109 | \
mramos@montevideo.com.uy |_____|\/|_____|\_____\
Firma la peticion de drivers para Linux en :
http://www.libranet.com/petition.spanish.html
Reply to: