Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Lua scripts for per_user classifier not work on 2.2 #427

Open
dacapoday opened this issue Dec 10, 2019 · 0 comments
Open

Using Lua scripts for per_user classifier not work on 2.2 #427

dacapoday opened this issue Dec 10, 2019 · 0 comments

Comments

@dacapoday
Copy link

Now at version 2.2. redis key isn't include per_user name, it only have RS_.
But before 2.0, i can use my custom userid for per_user.
my config is:

classifier "bayes" {
    tokenizer {
    name = "osb";
    }
    name = "base";
    backend = "redis";
    min_tokens = 11;
    min_learns = 200;
    autolearn = false;
    new_schema = true;

    per_user = <<EOD
return function(task)
    local rcpt = task:get_header('USER_ID')

    if (rcpt ~= nil and rcpt ~= '') then
        return rcpt
    end

    return nil
end
EOD

    statfile {
        symbol = "BAYES_HAM";
        spam = false;
    }
    statfile {
        symbol = "BAYES_SPAM";
        spam = true;
    }
    learn_condition = 'return require("lua_bayes_learn").can_learn';
}

feature require "Using Lua scripts for per_user classifier".
Does this feature still work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant