TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:9185] procmail



On Thu, 14 Oct 1999, Philip C Mendelsohn wrote:

> Looking to filter mail.  I'm using PINE at the U remotely.  I didn't see
> immediately in the man file how I can use procmail with PINE -- it seems
> to be a sendmail thing.  Did I miss it?

Hi, I set up some basic procmail filters for use on garnet a while back. I
used the procmail FAQ to help. It's a good reference; do a search on
Google for it. 

But here's the basics.

First, create a .forward file with this text:
"|IFS=' ' && exec /usr/local/bin/procmail -f- || exit 75 #<USERNAME>

The <USERNAME> part is required to make sure your .forward is different
from every other person on the system's.

Second, create a .procmailrc file. Here's mine:

#Set on when debugging
VERBOSE=off

MAILDIR=$HOME/mail

#Directory for storing procmail log and rc files
PMDIR=$HOME/.procmail

LOGFILE=$PMDIR/log
INCLUDERC=$PMDIR/rc.spam
INCLUDERC=$PMDIR/rc.mailinglists
INCLUDERC=$PMDIR/rc.general

Then, create the $PMDIR. Now, go into your $PMDIR (in my case, .procmail)
and create the rc.* which you want. As you can see from mine, I sort by
spam (which goes to /dev/null [Hey, if anyone has some good procmail spam
filters, will you post them? Mine's pretty basic and goes on a case by
case basis...], one for mailing lists, which directs the list to the
appropriate folder, and one for things which are neither mailing lists
nor spam.

Here's an example from my rc.mailinglists:

:0:
* ^TOtclug-list
INBOX.tclug

Read the docs for more info about this (man procmail, man procmailrc) for
more.

Now, you should be all set.

Luke