You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Paul Matthews <pa...@cathedral.qld.edu.au> on 2006/07/26 04:25:54 UTC

good ideas for spam blocking

Hi there,

at the moment I have the rules_du_jour script running every week and I
have the script below running every night telling SpamAssassin to learn
what I can from the uses junk mail folders, but I still seam to get a lot
of junk mail that gets past the scanners, can anyone make any suggestions
on something to do to block more spam?

Also the way i have setup the script below, does that add what is being
learnt from the sa-learn program into a database for all users, or just
for the single user is runs as?

#!/bin/bash

log="/var/log/procmail/SpamAssassin/sa-learn.log"
echo"" >>$log 2>/dev/null
date >>$log 2>/dev/null
echo "" >>$log 2>/dev/null

for i in $( ls /home/DOMAIN); do
     echo $i >>$log 2>/dev/null
     echo Reading /home/DOMAIN/$i/mail/Junk >>$log 2>/dev/null
     sa-learn -p /home/DOMAIN/$i/.spamassassin/user_prefs -u $i@locahost
--siteconfigpath=/etc/mail/spamassassin --mbox --spam /home/CATHE$
done
echo "SpamAssassin Learn Program Has Run"
/etc/init.d/spamassassin restart




Re: good ideas for spam blocking

Posted by Logan Shaw <ls...@emitinc.com>.
On Wed, 26 Jul 2006, Paul Matthews wrote:
> at the moment I have the rules_du_jour script running every week and I
> have the script below running every night telling SpamAssassin to learn
> what I can from the uses junk mail folders, but I still seam to get a lot
> of junk mail that gets past the scanners, can anyone make any suggestions
> on something to do to block more spam?

My standard suggestions:

1.  Make sure your Bayes database is part of the solution, not the
     problem, by checking its scores manually on certain messages.
2.  Make sure you have sender-based and URI-based network blacklists
     enabled.
3.  Make sure you have content-based network tests (like dcc or razor)
     enabled.

I did all of the above, haven't even bothered with custom
rules, and of course *some* e-mail is getting past, but not
really very much.

   - Logan

Re: good ideas for spam blocking

Posted by Matt Kettler <mk...@comcast.net>.
Paul Matthews wrote:
> Hi there,
>
> at the moment I have the rules_du_jour script running every week and I
> have the script below running every night telling SpamAssassin to learn
> what I can from the uses junk mail folders, but I still seam to get a lot
> of junk mail that gets past the scanners, can anyone make any suggestions
> on something to do to block more spam?
>
> Also the way i have setup the script below, does that add what is being
> learnt from the sa-learn program into a database for all users, or just
> for the single user is runs as?
>   
Generally speaking, sa-learn only adds to the database for the current user.

HOWEVER, you're using -u $i to over-ride the username (note: you can
ditch the @localhost part SA will just strip it).

*BUT*, sa-learn -u will only work if you're using a virtual-user
configuration.

Based on the rest of the script, you're not doing virutual users. (ie:
sql, --virtual-config-dir, etc).

If you aren't using virutal user configs, your script will only learn
into the bayes DB for the current user invoking the script. It will not
learn to any other user's bayes DB. To do that, you'll have to have a
script invoke sa-learn through su.


> #!/bin/bash
>
> log="/var/log/procmail/SpamAssassin/sa-learn.log"
> echo"" >>$log 2>/dev/null
> date >>$log 2>/dev/null
> echo "" >>$log 2>/dev/null
>
> for i in $( ls /home/DOMAIN); do
>      echo $i >>$log 2>/dev/null
>      echo Reading /home/DOMAIN/$i/mail/Junk >>$log 2>/dev/null
>      sa-learn -p /home/DOMAIN/$i/.spamassassin/user_prefs -u $i@locahost
> --siteconfigpath=/etc/mail/spamassassin --mbox --spam /home/CATHE$
> done
> echo "SpamAssassin Learn Program Has Run"
> /etc/init.d/spamassassin restart
>
>
>
>
>   


Re: good ideas for spam blocking

Posted by Marc Perkel <ma...@perkel.com>.
Create another highest MX record and point it to an IP address that 
doesn't go anywhere. I get rid of several hundred thousand spams a day 
doing that.