On Tuesday 24 February 2004 21:07, Bob S. wrote:
Originally set up spamassassin and had it learn from my mailboxes in Kmail. worked fine. I set up a special spam mailbox with a sub-mailbox named MissedSpam in which I placed spam that was slipping through. Now I want sa-learn to check on that mailbox and learn from it.
What I do is, cd into: '/home/bob/Mail' and then do a: "# sa-learn --spam --mbox -f /spam/MissedSpam"
Is this special mailbox a mbox format or is it maildir format? I think KDE defaults to maildir, in which case you have to have a sa-learn script that supports that format, such as this one #!/usr/bin/perl ################################################################### # A script to automatically update SpamAssassin's Bayesian filter # Michael Reynolds - michael@spinweb.net # SpinWeb Net Designs - http://www.spinweb.net ################################################################### # set some variables $SA_LEARN = "/usr/bin/sa-learn"; $HOME = "/home"; $FOLDER_DIR = "Mail"; $MISSEDSPAM_FOLDER = "MissedSpam"; $NOTSPAM_FOLDER = "NotSpam"; # get a listing of users @user = `ls -1 $HOME`; # loop and process for($i=0;$i<@user;$i++) { # trim carriage return chop($user[$i]); # define where ham is located my $user_notspam_folder = "$HOME/$user[$i]/$FOLDER_DIR/$NOTSPAM_FOLDER/cur"; # if the folder exists, learn from it if(-e $user_notspam_folder) { system("$SA_LEARN --ham $user_notspam_folder/*"); system("rm $user_notspam_folder/*"); } # define where spam is located my $user_missedspam_folder = "$HOME/$user[$i]/$FOLDER_DIR/$MISSEDSPAM_FOLDER/cur"; # if the folder exists, learn from it if(-e $user_missedspam_folder) { system("$SA_LEARN --spam $user_missedspam_folder/*"); system("rm $user_missedspam_folder/*"); } } # rebuild the database system("$SA_LEARN --rebuild"); -- _____________________________________ John Andersen