[Rspamd-Users] two classifiers give error

users-rspamd131020 at jworld.ch users-rspamd131020 at jworld.ch
Wed Oct 14 13:30:13 UTC 2020


I'd like to establish two classifiers, one general (bayes) for auto learn and one per user (bayes_user) that learns from what the user puts in his Spam folder. However, I get the following error(s):

2020-10-14 12:22:31 #90992(rspamd_proxy) <jsi44o>; cfg; rspamd_stat_init: cannot init classifier type bayes_user
2020-10-14 12:22:31 #90991(rspamd_proxy) <jsi44o>; cfg; rspamd_stat_init: cannot init classifier type bayes_user
2020-10-14 12:22:31 #90989(rspamd_proxy) <jsi44o>; cfg; rspamd_stat_init: cannot init classifier type bayes_user
2020-10-14 12:22:31 #90993(controller) <jsi44o>; cfg; rspamd_stat_init: cannot init classifier type bayes_user
2020-10-14 12:22:31 #90990(rspamd_proxy) <jsi44o>; cfg; rspamd_stat_init: cannot init classifier type bayes_user

I applied the following config:

classifier "bayes" {
    expire = 2144448000;
    min_tokens = 11; 
    backend = "redis";
    servers = "localhost:6378";
    database = "0";
    cache {
    }   
    autolearn {
        min_balance = 0.900000;
        spam_threshold = 6;
        ham_threshold = -0.500000;
        check_balance = true;
    }   
    tokenizer {
        name = "osb";
    }   
    learn_condition = "return require(\"lua_bayes_learn\").can_learn";
    #users_enabled = true;
    #per_user = true;
    store_tokens = false;
    min_learns = 200;
    statfile {
        symbol = "BAYES_HAM";
        spam = false;
    }   
    statfile {
        symbol = "BAYES_SPAM";
        spam = true;
    }   
    new_schema = true;
    signatures = false;
}
classifier "bayes_user" {
    expire = 2144448000;
    min_tokens = 11; 
    backend = "redis";
    servers = "localhost:6378";
    database = "1";
    cache {
    }   
    tokenizer {
        name = "osb";
    }   
    learn_condition = "return require(\"lua_bayes_learn\").can_learn";
    users_enabled = true;
    per_user = true;
    store_tokens = false;
    min_learns = 200;
    statfile {
        symbol = "BAYES_HAM_USER";
        spam = false;
    }   
    statfile {
        symbol = "BAYES_SPAM_USER";
        spam = true;
    }   
    new_schema = true;
    signatures = false;
}

description = "Statistical symbols";

symbols = { 
    "BAYES_SPAM" {
        weight = 5.1;
        description = "Message probably spam, probability: ";
    }   
    "BAYES_HAM" {
        weight = -3.0;
        description = "Message probably ham, probability: ";
    }   
    "BAYES_SPAM_USER" {
        weight = 8.1;
        description = "Message probably spam, probability: ";
    }   
    "BAYES_HAM_USER" {
        weight = -6.0;
        description = "Message probably ham, probability: ";
    }   
}

I can't find the problem. Or did I misunderstand the concept of classifier and this is not possible at all?



More information about the Users mailing list