Procmail rocks!

No replies
Offline
Joined: Dec 20 2003
Posts: 851

That is all.

# .procmailrc
# routes incoming mail to appropriate mailboxes
PATH=/usr/bin:/usr/local/bin
MAILDIR=$HOME/mail # all mailboxes are in mail/
LOGFILE=$MAILDIR/log.`date +%y-%m-%d`
SHELL=/bin/sh

# Make sure there's a space after header names
:0fwh
|formail -z

# Discard if From: = To:
SENTBY='formail -z -x"From:"'
:0
* ! ^To: drbob
* ? ^To: .*$SENTBY
/dev/null

# Any other mail not addressed to me is spam
# Warning: may discard BCC's to me
#:0
#* !To: .*drbob
#/dev/null

# Assume screaming headers are spam
:0D
* ^Subject: [-A-Z0-9\?!._ ]*$
/dev/null

# More spam patterns
:0
* ^Subject: .*(\?\?|!!|\$\$|viagra|make.*money|out.*debt|cialis)
/dev/null

__________________

Dr. Bob
Applefritter Admin