Training SA
MailScanner
mailscanner at SMITS.CO.UK
Sun Feb 22 09:00:40 GMT 2004
Try this script; we use it to pull the messages from junkmail and
goodmail folders on the Exchange and feed the messages to sa-learn like
so:
#!/bin/sh
SERVER=<fill in your server name / IP here>
USER=<spam checking user>
PASS=<password>
GOOD=goodmail
JUNK=junkmail
SPAM=/tmp/spam
NOTSPAM=/tmp/notspam
LOGFILE=/var/log/learn.spam.log
PREFS=/etc/MailScanner/spam.assassin.prefs.conf
SALEARN=/usr/bin/sa-learn
/usr/sbin/folderdump --host $SERVER --user $USER --pass $PASS --folder
Public\ Folders/$JUNK --dir $SPAM
/usr/sbin/folderdump --host $SERVER --user $USER --pass $PASS --folder
Public\ Folders/$GOOD --dir $NOTSPAM
date >> $LOGFILE
$SALEARN --prefs-file=$PREFS --spam $SPAM >> $LOGFILE 2>&1
rm -f $SPAM/*
$SALEARN --prefs-file=$PREFS --ham $NOTSPAM >> $LOGFILE 2>&1
rm -f $NOTSPAM/*
Make sure that the spam checking user has read access to the public
folders. You may want to restrict its write/delete access to the
junkmail folder only, otherwise a user may accidentally drag and drop a
valuable message on goodmail, rather than Ctrl+Drag and drop.
Bart...
-----Original Message-----
From: Michael St. Laurent [mailto:mikes at HARTWELLCORP.COM]
Posted At: 21 February 2004 04:43
Posted To: MailScanner
Conversation: Training SA
Subject: Re: Training SA
Steve Thomas <mailto:lists at STHOMAS.NET> wrote:
> On Fri, Feb 20, 2004 at 07:57:52PM -0800, Michael St. Laurent is
> rumored to have said:
>>
>> I might be able to fix that up... we are stuck with an Exchange
>> server here for the mail email system. I could create a folder on
>> it for people to move spam and non-spam messages into. What would I
>> then do to access those folders from the MailScanner server in such
>> a way that they could be fed into sa-learn?
>
> Never worked with exchange, so I can't say. You could probably do a
> perl script that logs in via pop3 or imap and downloads/deletes the
> messages from the exchange box. I know there's a bunch of exchange
> people on this list, so maybe you'll get a more definitive answer on
> Monday.
Okay, I'll wait to see what others have to say then.
Thanks. :-D
--
Michael St. Laurent
Hartwell Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: folderdump.pl
Type: application/octet-stream
Size: 2760 bytes
Desc: folderdump.pl
Url : http://lists.mailscanner.info/pipermail/mailscanner/attachments/20040222/e12922c2/folderdump.obj
More information about the MailScanner
mailing list