procmail
[Top] [All Lists]

Re: Spam rc file?

2002-01-12 04:28:36
On 11 Jan 02, Nick Wilson (nick(_at_)explodingnet(_dot_)com) wrote:

Happy Friday everybody.

I've beem looking around for some spam filtering stuff. I've found lots
of 'all-inclusive' complicated packages but I'm really looking for
something very simple.

What I'd like is a simple set of anti-spam recipes that i can include in
my .procmailrc and filter to a quarantine file for a while to check it's
working then /dev/null

If someone has a spam rc I can have or can point me to one I'd be most
obliged.

The simplest way I've found (that works) is to use a whitelist
(defining what you consider to be valid mail) and to set $DEFAULT to
some spam box or /dev/null so that spam gets put out of the way.

The following is a shortened version of my .procmailrc. Any mail which
is sent only to me or cc'd to me is considered valid as is anything
from specific mailing lists which I am subscribed to. Anything else is
spam. I've also added a blacklist to drop specific messages which have
got through my whitelist in the past.


--  BEGIN .procmailrc  --

#
# procmail filter file
# 

# preliminaries
SHELL=/bin/sh
MAILDIR=${HOME}/.Mail
LOGFILE=${MAILDIR}/procmail.log
SENDMAIL=/usr/lib/sendmail
SPAM=${MAILDIR}/filtered-spam
DEFAULT=${SPAM}


##############################################################################
# Some spam still gets through, this will kill specific messages
:0:
* ^From.*lifesupportal\.com|\
  ^From.*financecentre.co.uk|\
  ^From.*carsource\.co\.uk|\
  ^From(_dot_)*member_services(_at_)ud\(_dot_)com|\
  ^From.*192\.com|\
  ^From.*IT_Security|\
  ^From.*amazon|\
  ^From.*lawyer\.com|\
  ^Subject.*penis|\
  ^Subject.*money|\
  ^From.*ebulletins\.co\.uk|\
  ^Subject.*search.*engine|\
  ^From.*juno.com|\
  ^X-RBL-Warning|\
  ^X-AntiAbuse|\
  ^From.*klpeurorscg.com|\
  ^Content-type: text/html|\
  ^X-Mailer: CyberCreek Avalanche Millennium|\
  ^X-Mailer: SuperMail-2
${SPAM}

##############################################################################
# store any mail sent to me, or to a list that I am subscribed to


#############################################################################
## mailing lists

## wylug ###################################################
:0:
  * ^X-BeenThere: wylug|\
    ^From.*wylug|\
    ^To.*wylug
wylug


#############################################################################
## personal mail
:0:
* ^To(_dot_)*s\(_dot_)patterson(_at_)freeuk\(_dot_)com|\
  ^To(_dot_)*(_at_)s\(_dot_)patterson\(_dot_)freeuk\(_dot_)com|\
  ^Cc(_dot_)*s\(_dot_)patterson(_at_)freeuk\(_dot_)com|\
  ^To.*steve$
mbox

#############################################################################
# hopefully, by this stage, anything left should be spam and can be safely 
# deleted. But, for now, store it in a spam box (set by ${DEFAULT} above)

--  END .procmailrc  --

-- 
Stephen Patterson http://www.lexx.uklinux.net/
s(_dot_)patterson(_at_)SPAM(_dot_)freeuk(_dot_)com (remove spam to reply)
ICBM address 54-22-0N 0-28-0W  Linux Counter No: 142831 
GPG Public key: 252B8B37 available on public keyservers.

Attachment: pgpsakcQESfmQ.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>