On Monday 04 December 2006 1:54 pm, you wrote: > Warning: I am not a perl programmer, so my word is not final on this! > > In the subroutine used to send out an e-mail to your address, the > following condition: > > if ($spamlearned > 0 || $hamlearned > 0) > > ..must be met for the mail to be sent out, it seems. > > Here is my test, with ham and spam put in the necessary directories: >
> Spam output: Learned tokens from 43 message(s) (43 message(s) examined) > Ham output: Learned tokens from 219 message(s) (221 message(s) examined) > Spam Learned: > Ham Learned: > > > As you can see, Spam Learned: and Ham Learned: contain no values. That > is from the following portion of the script: > > { > # Learn the spam! > $spam = `sa-learn --spam $spampath`; > > # What was learned? > $spam =~ /^Learned from (\d*?) message\(s\) \(\d*? message\(s\) > examined\)\.$/; $spamlearned = $1; > > # Learn the ham! > $ham = `sa-learn --ham $hampath`; > $ham =~ /^Learned from (\d*?) message\(s\) \(\d*? message\(s\) > examined\)\.$/; $hamlearned = $1; > > if ($debug eq "true") > { > print "Spam output: $spam"; > print "Ham output: $ham"; > print "Spam Learned: $spamlearned\n"; > print "Ham Learned: $hamlearned\n\n"; > } > } > > > So, it would appear that across several SA versions, the data output > changed, and the two regexes for $spamlearned and $hamlearned now > yield no data and need to be revised. > > Without that being done, the values returned for $spamlearned and > $hamlearned will remain zero, and no mail will be sent. > > I hope someone more knowledgeable with Perl and SA data output can help > rectify this. > > > > -Wash > I see, although spam/ham is being learned, the script doesn't think it is. Although its not a major show stopper with the script, because it does basically what its supposed to do, learn spam/ham and report to Razor/Pyzor/DCC. For statistical purposes though having the output mailed would be nice. [EMAIL PROTECTED] chris]$ sa-learn --dump magic 0.000 0 3 0 non-token data: bayes db version 0.000 0 113324 0 non-token data: nspam 0.000 0 16886 0 non-token data: nham [EMAIL PROTECTED] chris]$ sa-learn --dump magic 0.000 0 3 0 non-token data: bayes db version 0.000 0 113328 0 non-token data: nspam 0.000 0 16914 0 non-token data: nham Thanks for your help, I appreciate it. Chris -- Chris
pgpCJpcE9IBWL.pgp
Description: PGP signature