You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Greg Ennis <Po...@PoMec.Net> on 2004/11/04 19:30:21 UTC

Re: PRocmail recipe problem and spamassassin not filtering correctly

On Thu, 2004-11-04 at 09:53, hitete@free.fr wrote:
> Hi all,
> 
> I use spamassassin 2.63 on fedora core 2.
> I have two problems :
> 
> 1. Spamassassin does not flag all spam, although muy level is at 3. Sometimes he
> doesn't even have ONE hit on a spam message !!!.
> 
> 2. I want to move the spam messages to a specific folder, how to do that ?.
> 
> 
> My procmail.log says :
> 
> ==================================================
> >From user@domain  Thu Nov  4 09:57:10 2004
>  Subject: A SPECIFIC SUBJECT
>   Folder: /var/spool/mail/THE USER'S LOGIN
> procmail: Incomplete recipe
> ==================================================
> 
> 
> My local.cf in spamassassin folder is like this :
> ==================================================
> rewrite_subject 1
> subject_tag [*****ATTENTION SPAM*****]
> report_safe 0
> 
> use_bayes 1
> auto_learn 1
> 
> # Spam domains
> 
> blacklist_from *@advertisingbymail.com
> blacklist_from *@getquicknews.com
> blacklist_from *@getquickernews.com
> blacklist_from *@myquicknews.com
> blacklist_from *@mygreateststuff.com
> blacklist_from *@incluudes.com
> 
> ==================================================
> 
> Here is my procmailrc file :
> 
> ==================================================
> LOGFILE=/var/log/procmail.log
> 
> :0 fw
> * < 256000
> | /usr/bin/spamc -f
> 
> :0:
> * ^X-Spam-Level: \*\*\*
> 
> ==================================================
> Can someone help me out ?.
> 
> 
> /hitete

I have been doing this and it works like a charm even with 2.63.  I
would advise you to use 3.0.1 it is much much faster.  Some things you
need to consider are the following:

1. When you set up your local.cf file you must rewrite the Subject line
to identify the message as spam.  

In the SA 3.0.1 local.cf file Located in /etc/mail/spamassassin/ I use
the following two lines  (check the syntax in 2.63 becuase it is a
little differnt)

required_hits 5
rewrite_header Subject [SPAM]


In the /etc/procmailrc file I use the following entries:

MAILDIRLOG=/smile$HOME/Mail
DROPPRIVS=YES
                                                                                :0fw
 * < 256000
 | spamc
                                                                                
 # This routine will dump your spam
 :0 H
 * ^Subject:.*\[SPAM\]
 $MAILDIRLOG/spam.log

Please note that the directory you want to save the spam in must have
proper user protections and you must drop to user privileges within
procmail before you activate spamc. spamc of course requires the use of
the spamd daemon.

These suggestions are basic things for most on this list, but if you are
new to using these tools it will save you some look up and experimenting
time.

Good Luck!!!

Greg



Re: PRocmail recipe problem and spamassassin not filtering correctly

Posted by Greg Ennis <Po...@PoMec.Net>.
> 
> These suggestions are basic things for most on this list, but if you are
> new to using these tools it will save you some look up and experimenting
> time.
> 
> Good Luck!!!
> 
> Greg
> 

One thing I failed to mention is that you must make sure you have enough
disk space to save the file.  I you do not have enough disk space or if
the protections are not correct for what you want to do procmail will
put the file in the users mail.  You should write a script that kills of
the spam files to keep it from becoming too large.  I use a script that
renames the saved spam files on a daily basis and keep each new file for
about a week.  This keeps the disc space use by the spam files
automatically managed.