Mailing List Archive

[SpamAssassin Wiki] Updated: BayesInSpamAssassin
Date: 2004-12-02T18:18:12
Editor: GadiCohen <dragon@wastelands.net>
Wiki: SpamAssassin Wiki
Page: BayesInSpamAssassin
URL: http://wiki.apache.org/spamassassin/BayesInSpamAssassin

no comment

Change Log:

------------------------------------------------------------------------------
@@ -43,6 +43,42 @@

(DanKohn)

+Here's an alternative... assuming you have an actual account on the server (with ssh access) here's a very simple script which will keep your local ham and spam mbox files in sync with what's on the server, and run sa-learn remotely. In my case I have folders called AA-HAM and AA-SPAM in Evolution. A good habit is, instead of deleting read mail, moving it to the ham folder. Anyways, the script should make things obvious, its a very basic script but it works:
+
+{{{
+#!/bin/sh
+# trainspam v0.1
+
+MAILDIR=~/.evolution/mail/local/Inbox.sbd
+HAMBOX=AA-HAM
+SPAMBOX=AA-SPAM
+
+SERVER=dragon@smithers
+TMPDIR=~/tmp
+VERBOSE=1
+
+# --- DONT EDIT BEYOND THIS POINT
+
+echo Synchronizing $HAMBOX and $SPAMBOX to $SERVER:$TMPDIR
+rsync --partial --progress -z -e ssh $MAILDIR/{$HAMBOX,$SPAMBOX} $SERVER:$TMPDIR
+
+ssh $SERVER "
+ echo ; echo 'Learning ham...' ; echo ;
+ sa-learn --ham --showdots --mbox $TMPDIR/$HAMBOX ;
+ echo 'Learning spam...' ; echo ;
+ sa-learn --spam --showdots --mbox $TMPDIR/$SPAMBOX"
+}}}
+
+Some comments.
+
+1. OBVIOUSLY -- change the options at the very beginning.
+
+2. The -z option to rsync automatically uses gzip compression; no need to do this first. Also it will only sync newly added parts of the file, it doesn't re upload the file everytime!
+
+3. I didn't get round to the verbose stuff yet, but basically to make stuff cleaner take out all the echo lines, the --partial option to rsync, and the --showdots option to sa-learn.
+
+(GadiCohen)
+
= Training plus reporting =

If you only train your own bayes database using ''sa-learn'', you will not be reporting the spam message you received to spam checksum services such as dcc, pyzor, or razor.
[SpamAssassin Wiki] Updated: BayesInSpamAssassin [ In reply to ]
Date: 2004-12-02T18:24:25
Editor: GadiCohen <dragon@wastelands.net>
Wiki: SpamAssassin Wiki
Page: BayesInSpamAssassin
URL: http://wiki.apache.org/spamassassin/BayesInSpamAssassin

no comment

Change Log:

------------------------------------------------------------------------------
@@ -77,6 +77,8 @@

3. I didn't get round to the verbose stuff yet, but basically to make stuff cleaner take out all the echo lines, the --partial option to rsync, and the --showdots option to sa-learn.

+4. If your key isn't authorized on the server, you'll need to enter in your password twice. Some info on how to do this here: http://www.unixpeople.com/HOWTO/configuring.ssh.html
+
(GadiCohen)

= Training plus reporting =