Bayes?

Julian Field mailscanner at ecs.soton.ac.uk
Fri Mar 21 18:33:49 GMT 2003


At 18:21 21/03/2003, you wrote:
>Very interesting!  Two questions:
>
>1)  I'm assuming that your users just forward their emails to these
>addresses.

They "bounce" or "redirect" not "forward". Forwarding a message changes the
message a lot, and throws away all the headers. Unfortunately it looks like
Outlook can't redirect/bounce a message at all, which is pretty stupid.

>   Will it make a difference to the bayes filter that the message
>has been forwarded, or is it just looking at the body of the message?

It's looking at all of it, headers and body.

>2)  Do you have to worry about some kind of locking of the bayes database
>when running sa-learn, so that sa-learn is not updating it while MailScanner
>is calling spamassassin to use it at the same time?

The locking is all taken care of for you. Don't worry.

> > -----Original Message-----
> > From: Julian Field [mailto:mailscanner at ECS.SOTON.AC.UK]
> > Sent: Friday, March 21, 2003 9:57 AM
> > To: MAILSCANNER at JISCMAIL.AC.UK
> > Subject: Re: [MAILSCANNER] Bayes?
> >
> >
> > At 14:51 21/03/2003, you wrote:
> > >Just qurious about spamassassins bayes function in
> > connection with MS.
> > >Is MS utilizing the bayes function automatically
> >
> > Yes.
> >
> > >  or do you have to
> > >configure something to make it work?
> >
> > No.
> >
> > >  If so what, and do you have to
> > >run a "learning session" with it?
> >
> > No.
> >
> > >  That is, do you have to run some
> > >definitly SPAM emails and some non SPAM emails through it?
> >
> > No.
> >
> > MailScanner is using the bayes function automatically.
> > Uniquely, the bayes
> > engine in SpamAssassin is "self-learning"; it uses the other rules to
> > identify messages which have either a very high score or a
> > very low score,
> > and it continuously feeds them to the bayes engine itself without you
> > needing to do anything.
> >
> > If you want to teach it when it gets it wrong, you can have it run the
> > "sa-learn" script to learn about particular messages. I have set up 2
> > addresses here, "spam" and "notspam". Their mailboxes live on the main
> > MailScanner server, and people can just redirect wrongly-classified
> > messages to one of the addresses. Then once an hour the
> > script below is run
> > by cron to teach the bayes engine about the messages it got
> > wrong. For the
> > script below, I have copied SpamAssassin's "sa-learn" script into the
> > MailScanner bin directory.
> >
> > You should also run a nightly cron job that does a "sa-learn
> > --rebuild" as
> > well, to do all the housekeeping the Bayes engine requires.
> >
> > #!/bin/sh
> >
> > SPAM=/var/mail/spam
> > NOTSPAM=/var/mail/notspam
> >
> > 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
> >    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
> >    rm -f $BOX
> > fi
> >
> > --
> > Julian Field
> > www.MailScanner.info
> > MailScanner thanks transtec Computers for their support
> >

--
Julian Field
www.MailScanner.info
Professional Support Services at www.MailScanner.biz
MailScanner thanks transtec Computers for their support



More information about the MailScanner mailing list