Filtering spam with procmail and spamassassin

Step one: First add the following line to your .forward file in your home directory:

"|IFS=' ';exec /usr/local/bin/procmail #Username here"

Step two:Create a .procmailrc file in your home directory with the following lines:

VERBOSE=on
MAILDIR=$HOME/mail
PMDIR=$HOME/.procmail
LOGFILE=$PMDIR/log
INCLUDERC=$PMDIR/spam.rc

Step three:Create a .procmail directory in your home directory.

Step four:Create a file .procmail/spam.rc with the following lines:

:0fw
| /usr/bin/spamc -d spamfilter.rutgers.edu -p 7831

:0:
* ^X-Spam-Status: Yes
caughtspam

All of your spam tagged email will them reside in $HOME/mail/caughtspam file.