[Rspamd-Users] fuzzy learn condition failed
christian
usenet at schani.com
Sun Aug 18 17:32:33 UTC 2024
Hello G.W.,
Is this the right way to use the autolearn function for local fuzzy?
Is this how you do it?
Christian
Am 18.08.2024 um 19:08 schrieb G.W. Haywood:
> Hi there,
>
> On Sun, 18 Aug 2024, christian via Users wrote:
>
>> 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]};
>> ...
>> What am I doing wrong?
>
> The error message tells you that at line 3 you're trying to compare a
> number with something which is not a number. You can't do that.
>
>> Can you please give me a tip.
>> ...
>> ...
>> return function(task)
>> local score = task:get_metric_score('default')
>> if score >= 10 then
>> ...
>
> The documentation here
>
> https://www.rspamd.com/doc/lua/rspamd_task.html#m5519f
>
> says get_metric_score returns two values as a kind of table.
>
More information about the Users
mailing list