confirming SPAM

Julian Field mailscanner at ecs.soton.ac.uk
Fri Mar 28 08:42:31 GMT 2003


At 02:52 28/03/2003, you wrote:
>Thanks for the input Julian.
>
>I have MailScanner working and it is bouncing all spam it finds as well as
>forwarding it to me as the system admin.
>
>I have gotten Razor2 installed and working. I have successfully registered
>on the network. I am having difficulty with two issues:
>
>>Also, using the new Bayes engine in SpamAssassin 2.51 (but I would advise
>>you to wait for 2.52 release), the anti-spam engine will learn about spam
>>messages that it got wrong by your users feeding back the spam into the
>>engine. I have 2 addresses here, "spam" and "notspam", which users bounce
>>mail to when the spam engine gets it wrong. So its performance improves
>>with time as it learns lots of new spam.
>
>
>1- You mentioned that you have 2 addresses setup for reporting spam called
>"spam" and "notspam". I have not found any documentation on how to
>accomplish this. Do you know where I can find documentation? I would like
>to make it as easy as possible for Windows users to be able to report spam
>and forwarding any incorrect messages to an email address would make it a
>snap (needless to say that I don't want them forwarding to my address).

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


>2- I have SpamAssassin working with MailScanner and have not seen any
>settings or configs for Bayes. How do I turn it on or set it up?

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.


>Thanks for any assistance or info.
>
>
>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

--
Julian Field
www.MailScanner.info
MailScanner thanks transtec Computers for their support



More information about the MailScanner mailing list