A suggestion on bogofilter option -s and -n

David Relson relson at osagesoftware.com
Thu Jul 1 21:50:40 CEST 2004


On Fri, 02 Jul 2004 03:21:04 +0800
Wang Jian wrote:

> Hi David Relson,
> 
> I have make a new patch which is for 0.92.0. I also tested the various
> cases and it seems to work fine.
> 
> What changed from last patch:
> 
> 1. a logic problem in the code;
> 2. support -Sn or -Ns combination;
> 3. the long option name is now --train-on-error;
> 
> But I don't like the idea that use -g with -S or -N, it is confusing
> at all in the first place.
> 
> +    if (train_on_error_mode) {
> +        spamicity = msg_compute_spamicity(w, NULL);
> +        status = msg_status();
> +        if (run_type & REG_GOOD && status == RC_HAM) {
> +            run_type = run_type & (~ REG_GOOD);
> +            run_type = run_type & (~ UNREG_SPAM);
> +        } else if (run_type & REG_SPAM && status == RC_SPAM) {
> +            run_type = run_type & (~ REG_SPAM);
> +            run_type = run_type & (~ UNREG_GOOD);
> +        }
> +    }
> 
> 
> 
> And, FYI, I did dig through code and make sure '-g' is not used, and
> did check OPTIONS includes 'g', it is not my luck :)

Wang,

True you _did_ use skill.  Since 'g', 'r', and 'f' are not used in
0.92.0 they should not have been in OPTIONS.  _That's_ where you got
lucky.

The patch won't be in 0.92.1, which I'm going to get out later today
(before I head out for the long July 4 weekend).  I want time to review
it, experiment, etc, etc.

Regards,

David



More information about the Bogofilter mailing list