[Rspamd-Users] fuzzy learn condition failed
christian
usenet at schani.com
Sun Aug 18 15:20:04 UTC 2024
Hello, I get the error message:
2024-08-18 17:06:02 #2206254(controller) <7fdc00>; task;
fuzzy_process_handler: call to fuzzy learn condition failed: [string
"return function(task)..."]:3: attempt to compare number with table;
trace: [1]:{[string "return function(task)..."]:3 - <unknown> [Lua]};
It seems that no evaluation results can be written to the sqlite3 database.
What am I doing wrong? Can you please give me a tip.
Thanks
Here is my fuzzy_check.conf file
rule "wwl" {
# Fuzzy storage server list
servers = "localhost:11335";
# Default symbol for unknown flags
symbol = "WWL_FUZZY_UNKNOWN";
# Additional mime types to store/check
mime_types = ["*"];
# Hash weight threshold for all maps
max_score = 30.0;
# Whether we can learn this storage
read_only = false;
# Ignore unknown flags
skip_unknown = yes;
# Hash generation algorithm
algorithm = "mumhash";
# Use direct hash for short texts
short_text_direct_hash = true;
skip_images = false;
retransmits = 5;
timeout = 10s; #time: Timeout to wait for a reply from a fuzzy server,
e.g. 1s, 2m, 5h
min_bytes = 256;
min_height = 250;
min_width = 250;
scan_archives = true;
text_shingles = true;
text_multiplier = 4.0;
min_length = 32;
autolearn = true;
learn_condition = <<EOD
return function(task)
local score = task:get_metric_score('default')
if score >= 10 then
return true
end
if score <= -5 then
return true
end
return false
end
EOD;
# Map flags to symbols
fuzzy_map = {
WWL_FUZZY_BLOCK {
# Local threshold
max_score = 30.0;
# Flag to match
flag = 11;
}
WWL_FUZZY_SPAM {
max_score = 5.0;
flag = 12;
}
WWL_FUZZY_HAM {
max_score = -1.00;
flag = 13;
}
WWL_FUZZY_AUTOLEARN_SPAM {
# Local threshold
max_score = 5.0;
# Flag to match
flag = 15;
}
}
}
More information about the Users
mailing list