confirming SPAM

Dene Ulmschneider dene at DATATECHIE.COM
Sat Mar 29 20:14:46 GMT 2003


Julian-

please see below

>Create a couple of local accounts, called "spam" and "notspam" whose
>mailboxes will live on the MailScanner server. The following script makes a
>few assumptions on where things live, but you can easily edit them to suit
>your environment. Create a cron job to run this script every hour or so.
>The "sa-learn" command is a script that comes with SpamAssassin.
>
>#!/bin/sh
>
>SPAM=/var/mail/spam
>NOTSPAM=/var/mail/notspam
>TOTAL=.cumulative
>
>LOGFILE=/var/log/learn.spam.log
>PREFS=/opt/MailScanner/etc/spam.assassin.prefs.conf
>SALEARN=/opt/MailScanner/bin/sa-learn
>
>date >> $LOGFILE
>if [ -f $SPAM ]; then
>   BOX=${SPAM}.processing
>   mv $SPAM $BOX
>   sleep 5 # Wait for writing current message to complete
>   $SALEARN --prefs-file=$PREFS --spam --mbox $BOX >> $LOGFILE 2>&1
>   cat $BOX >> ${SPAM}${TOTAL}
>   echo >> ${SPAM}${TOTAL}
>   rm -f $BOX
>fi
>
>if [ -f $NOTSPAM ]; then
>   BOX=${NOTSPAM}.processing
>   mv $NOTSPAM $BOX
>   sleep 5 # Wait for writing current message to complete
>   $SALEARN --prefs-file=$PREFS --ham --mbox $BOX >> $LOGFILE 2>&1
>   cat $BOX >> ${NOTSPAM}${TOTAL}
>   echo >> ${NOTSPAM}${TOTAL}
>   rm -f $BOX
>fi

This will be implemented as the next step after I resolve the issue below.

>Make sure you have installed "DB_File" using CPAN. If that fails, you
>probably haven't got BerkeleyDB installed (www.sleepycat.com). Remove the
>"use AnyDBM_File;" statement from the top of
>/usr/lib/MailScanner/MailScanner/SA.pm. Delete all the database files in
>/root/.spamassassin. Then start up MailScanner again and it should start
>learning Bayes statistics from mail it sees. The default settings for
>SpamAssassin's Bayes filter will work just fine.

I did not have DB_File installed. I installed it form CPAN and the install
went smoothly. All other components seem to be installed. I then deleted
the files you mentioned and they were recreated automatically. At this
point I believe that Bayes is working - but is there a way to verify that
it is learning? I see the "bayes_msgcount" file but it does not appear to
be growing over time. The file is 2.5Kb and contains only a long line of
DOTS (or periods). How can I verify that Bayes is working correctly?


Thank You

Dene Ulmschneider
Data Techie Inc.
-------------------------------------------------------------------------
office:         718.738.8859
cell:           646.996.2976
email:          dene at datatechie.com
pager mail:     denenow at datatechie.com
website:        www.datatechie.com
-------------------------------------------------------------------------
"Life is too short...-...you  should have dessert first"


--
This message has been scanned for viruses and dangerous
content by Data Techie, and is believed to be clean.
Data Techie... always there to protect you!
http://www.datatechie.com



More information about the MailScanner mailing list