On Tue, 2004-06-22 at 11:12, Robert Bartlett wrote:
> Can Spamassassin drop emails if it is over a certain amount of points? Or
> is that a maildrop script? I thought I saw a script on here that did that,
> something with an if statement and a exit statement.
> 
> Basically if the points on an email is over a certain amount then I want
> the email dropped instead of delivered.
> 
> Thanks
> Robert

Robert,

I have done almost what you want with procmail.  Here is my procmail
rule:

DROPPRIVS=YES
PATH=/usr/bin:/bin:/usr/local/bin:
LOGABSTRACT=ALL
MAILDIRLOG=/smile$HOME/Mail
LOGFILE=$MAILDIRLOG/from.log

                                                                        
# Check to see if there is spam in this packet and if so mark it as spam
 :0fw
 * < 256000
 | spamc
                                                                                
 # This routine will dump the spam into the user's file
 :0 H
 * ^Subject:.*\[SPAM\]
 $MAILDIRLOG/spam.log

What I do is to dump all of the spam in a user file as it comes in. 
Once per day I have a perl script that reads the file and creates an
e-mail that includes a listing of the contents of the file (Subject,
Sender, and Spam level) and then mail it to the user.  If the user wants
any of the spam they can send me a note and I will get it for them.  I
keep the files rotating on a daily basis so I have a week's worth of
each user's spam saved in their account at any given time.  I have plans
to allow them to retrieve their spam without my interference, but in 6
months I have only had one request to retrieve any messages... so I have
not bothered to write the additional module.

Hope this helps.

Greg Ennis


Reply via email to