Here's the code modifications (for 1.4.1.1.21) to allow for specific users
to be Bayesian Test Mode users when Bayesian test mode is turned off for
everyone else.  This will allow messages that are flagged bayesian to be
passed on while marking the subject (if a subject is specified) for select
users.  Think of it as a subject marking bayesian spam lover.


After
['baysTestMode','Bayesian Test Mode',0,\&checkbox,1,'(.*)',undef,''],

add
['baysTestModeUserAddresses','Bayesian Test Mode User
Addresses*',80,\&textinput,'','(.*)','ConfigMakeSLRe',
 'These users are in test mode / mark subject only for bayesian spam, even
with test mode above off','Basic'],

In "our %MakeSLRE = (", add:
    'baysTestModeUserAddresses' => 'BSLTESTUSERRE',


In the thisIsSpam sub, after:
   $error =~ s/LOCALDOMAIN/$mfd/g;
add
    my $BaysTestUser=0;
    if ($reason eq 'Bayesian') {
        if (allSH( $this->{rcpt}, 'baysTestModeUserAddresses' )) {
            $this->{testmode} = "bays test mode user";
            $BaysTestUser=1;
            $slok=0; # make sure it's not flagged as a spam lover
        }
    }

In the thisIsSpam sub, change:
} elsif ( $testmode ) {
            $this->{prepend}.="[testmode]";
            $this->{saveprepend2}.="[testmode]";
            mlog($fh,"passing as safe because testmode, otherwise
$reason",1);
to:
} elsif ( $testmode ) {
            if ($BaysTestUser) {
                $this->{prepend}.="[bays test user]";
                $this->{saveprepend2}.="[bays test user]";
                mlog($fh,"passing as safe because bays test user, otherwise
$reason",1);
            } else {
                # regular test mode
                $this->{prepend}.="[testmode]";
                $this->{saveprepend2}.="[testmode]";
                mlog($fh,"passing as safe because testmode, otherwise
$reason",1);
            }

Fritz - do you need more documentation than what I've provided?  I'm happy
to discuss if you'd like.  Anything to help the ASSP community which has
been so helpful to me.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Assp-test mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/assp-test

Reply via email to