Spam control

Martin Schiøtz malinux at gmail.com
Tue Jun 20 08:01:27 EDT 2006


On 6/20/06, Scott Russell <lnxgeek at us.ibm.com> wrote:
> Martin Schiøtz wrote:
> > My next step is to install Spam control. My plan is to use
> > Spamassassin with dcc, razor, pyzor and bayes system. A want mail
> > users to be able to disable and enable spam control. I also wan't mail
> > users that has enabled spam control to train (sa-laern) and keep their
> > own bayes database.
>
> Use spamc and spamd in combination with postfix. The postfix
> FILTER_README will help you out. In my master.cf I have
>
> 192.168.1.100:smtp
>           inet  n       -       n       -       -       smtpd
>     -o smtp_send_xforward_command=yes
>     -o content_filter=spamc
>
> 127.0.0.1:smtp
>           inet  n       -       n       -       -       smtpd
>     -o local_recipient_maps=
>     -o mynetworks=127.0.0.1
>     -o smtpd_client_restrictions=permit_mynetworks,reject
>
> spamc     unix  -       n       n       -       20      pipe
>     flags=Rq user=spamd argv=/usr/bin/spamc -u ${user} -t 300
>     -s 250000 -e /usr/sbin/sendmail -oi -f ${sender} -- ${recipient}
>
> This has postfix feed all inbound smtp mail from 192.168.1.100 into the
> spamc transport and back out to the localhost:smtp transport after spam
> checking. Make sure you configure SA to store everything in your
> database (accounts, preferences, bayes) and take advantage of the spamc
> -u option to specify the SA username for loading individual preferences.
>
Thanks!  Yes, I can see that postfix has these fine features - it was
that kind of thing I was looking for!
I think this also answer my other question about excuting a
mail-to-sms perl script.

> For training bayes, you will find much better performance using spamc +
> spamd instead of sa-learn and you'll get the same results. Create
> per-user spam training folders (maybe "Learn as SPAM" and "Learn as HAM"
> and have a script do the following:
>
> 1) From the DB, find all users with the SA pref 'use_bayes' enabled.
> 2) For each user, find the "Learn as SPAM" folder
> 3) Read each message in the folder and pipe it into spamc for training
> 4) Mark the message deleted and repeat for the next message in the folder
> 5) Expunge the folder
> 6) Locate the next "Learn as HAM" folder and repeat steps 3 - 5
>
> A script like the above can be setup to run from cron as often as you need.

I understand the steps but I'm not sure about how to use spamc/spamd
for training/learning and not sa-learn. Are you thinking about
'bayes_auto_learn = 1' ?
Could you give me an example of the command?

> >
> > I can see a lot docs about postfix, cyrus and amavisd-new but can
> > amavis-new work with personal bayes db and sa-learn etc.?
>
> No. Amavisd-new does site wide bayes only. If you want personal bayes
> you need to roll your own solution, which is what I did as described above.

Ok, I thought so!

>
> --
> Scott Russell <lnxgeek at us.ibm.com>
> IBM Linux Technology Center System Admin
>
> ----
> Cyrus Home Page: http://asg.web.cmu.edu/cyrus
> Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
>


More information about the Info-cyrus mailing list