[SC.LUG] Spam

David Bean david at dbean.uklinux.net
Sun Mar 21 17:11:19 GMT 2004


On Sat, 2004-03-20 at 17:43, Geoff wrote:
> Quick question:
> How do you guys manage the spam you receice.

spamassassin and procmail filters. 

Spamassasin is set with a fairly high threshold (15) and puts spam in
"spam".  Messages with a threshold over 10 are put in "spam.possible".
Then all that are left are filtered to appropriate Maildir's if they
have a rule. (kinda whitelisting)
Those without a rule, which are spam and new senders are then filtered
using the spamassassin threshold of 5, and put in "spam.possible" or
"inbox-catchall"

Also some senders, maplin being one, are filtered using spamassasin's
whitelist as their newsletter gets a really high score. I check all
folders regularly for something misplaced but this doesn't take long.

I've attached my .procmailrc so you can see. Some rules are broken
though, and some are untested hence the .backup which keeps unmodified
copies of all emails. 

How much benefit will I get from using razor and other similar services?

David Bean
-------------- next part --------------
PATH=/usr/local/bin:/usr/bin:/bin:
MAILDIR=$HOME/Maildir	# You'd better make sure it exists
DEFAULT=$MAILDIR
VERBOSE=on
LOGFILE=$HOME/.procmail.log
#LOGABSTRACT=all
## The condition line ensures that only messages smaller than 250 kB
## (250 * 1024 = 256000 bytes) are processed by SpamAssassin. Most spam
## isn't bigger than a few k and working with big messages can bring
## SpamAssassin to its knees.
##
## The lock file ensures that only 1 spamassassin invocation happens
## at 1 time, to keep the load down.
##
#:0fw: spamassassin.lock
#* < 256000
#| /usr/bin/spamassassin
:0 c
.backup/

:0fw
* < 256000
| spamc

:0e
{
  EXITCODE=$?
}

## Mails with a score of 15 or higher are almost certainly spam (with 0.05%
## false positives according to rules/STATISTICS.txt). Let's put them in a
## different mbox. (This one is optional.)
:0:
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
.spam/

# Spam with a threshold above 10 is put in possible.
:0:
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*
.spam.possible/
# Later, after all other rules are applied, spam with a threshold above 5 points
# are put in possible spam.

## All mail tagged as spam (eg. with a score higher than the set threshold)
## is moved to "probably-spam".
#:0:
#* ^X-Spam-Status: Yes
#.spam.possible/

## Work around procmail bug: any output on stderr will cause the "F" in "From"
## to be dropped.  This will re-add it.
:0:
* ^^rom[ ]
{
  LOG="*** Dropped F off From_ header! Fixing up. "
  
  :0 fhw
  | sed -e '1s/^/F/'
}

##
## Put your own rules here.
##

##
## Mailing Lists
##

# nottingham linux user group
:0:
* ^TOnottingham at mailman.lug.org.uk
.lists.nlug/

# loughborough university linux users
:0:
* ^TOlulu at lists.lboro.ac.uk
.lists.lulu/

# Staffslug
:0:
* ^TOStaffslug(|-request)@staffslug.org.uk
.lists.staffslug/
:0:
* ^From:.*Staffslug(|-request)@staffslug.org.uk
.lists.staffslug/

# staffs lug
:0:
* ^From:.*staffs(|-request)@mailman.lug.org.uk
.lists.staffslug/
:0:
* ^(reply-|)To:.*staffs(|-request)@mailman.lug.org.uk
.lists.staffslug/

# South cheshire lug
:0:
* ^List-Id:.*sc.mailman.lug.org.uk
.lists.sclug/

# Hurd
:0:
* ^X-Mailing-List:.*debian-hurd at lists.debian.org
.lists.hurd/
:0:
* ^From:.*debian-hurd-request at lists.debian.org
.lists.hurd/

# gnupic
:0:
* ^TOgnupic at linuxhacker.org
.lists.gnupic/
:0:
* ^From:.*gnupic-help at linuxhacker.org
.lists.gnupic/

# Piclist PIC
:0:
* ^TOPICLIST at MITVMA.MIT.EDU
* ^Subject:.*\[PIC
.lists.piclist/

# Piclist Junk
:0:
* ^TOPICLIST at MITVMA.MIT.EDU
/dev/null

# UKlinux users
:0:
* ^List-id:.*users.uklinux.net
.lists.uklinux/

# UKlinux notices
:0:
* ^List-id:.*status.uklinux.net
.lists.uklinux/

# slashdot
:0:
* ^TOtimmy at dbean.uklinux.net
.lists.slashdot/

# mailman membership
:0:
* ^From:.*mailman-owner
* ^Subject:.*mailing list memberships reminder
.lists

##
## Regular, newsletters etc non shopping
##

# Gamasutra
:0:
* ^From:.*inside at gamasutra.com
.regular/

# Wine releases
:0:
* ^TOwine-releases at winehq.com
.regular/
:0:
* ^From:.*wine-releases-request at winehq.com
.regular/

# Friends reunited
:0:
* ^From:.*newpupil at friendsreunited.co.uk
.regular/

##
## Job website emails
##

# fish4 
:0:
* ^TOfish4 at dbean.uklinux.net
.jobs/

# catch all: jobsgopublic
:0:
* ^TOjobs at dbean.uklinux.net
.jobs/

# Syntaxnet
:0:
* ^From:.*@syntaxnet.com
.jobs/

# New Wave Resourcing
:0:
* ^From:.*@nwruk.com
.jobs/

# totaljobs
:0:
* ^From:.*@totaljobsmail.co.uk
.jobs/

# jamjobs
:0:
* ^From:.*@jamjobs.co.uk
.jobs/

# gojobsite, and jobsite
:0:
* ^From:.*@(go|)jobsite.co.uk
.jobs/

# cityjobs.com
:0:
* ^From.*cityjobs.com
.jobs/

##
## Misc
##

# uklinux.net support
:0:
* ^From:.*support at uklinux.net
./

# ebay
:0:
* ^From:.*ebay.co
.shopping.ebay/

# ebay users
:0:
* ^Subject:.*(Question (from ebay Member|for seller)|Congratulations. You are the buyer for| item #[0-9]*)
.shopping.ebay/


# paypal
:0:
* ^From:.*paypal.co
.shopping.ebay/

# cd-wow
:0:
* ^From:.*cd-wow.com
.shopping/

# Britannia Music Club
:0:
* ^From:.*bclub.co.uk
.shopping/

# dabs
:0:
* ^From:.*dabs.com
.shopping/

# amazon
:0:
* ^From:.*amazon.co
.shopping/

# rs components
:0:
* ^From:.*uk.rs-components.com
.shopping/

# maplin newsletter
:0:
* ^From:.*newsletter at maplin.co.uk
.shopping/

##
## Friends and Family
##


##
## Possible spam not caught by above rule
##
:0:
* ^X-Spam-Level: \*\*\*\*\*
.spam.possible/

# Catchall, catch all emails not matched by above rules
:0:
* > 0
.inbox-catchall/

#:0:
#* ^X-Spam-Status: Yes
#| formail -I "Status: R" >> Junk



More information about the SC mailing list