aduernberger
26f96b81fd
[Fix] Increase/decrease hash_key value for tokens depending on is_unlearn
When relearning a message, this script is called twice:
1. With `is_unlearn` true and the old `is_spam` value
2. With `is_unlearn` false and the new `is_spam` value
If `is_unlearn` is true, the code should not increase the value of the hash_key. Decreasing it ensures that it behaves like a fresh learn with the new is_spam value.
2 meses atrás
aduernberger
ccc1716bb5
[Fix] Update is_spam in learned_ids when relearning
2 meses atrás
Vsevolod Stakhov
ef35949188
[Fix] Change expiration logic for redis_cache
Noticed by: @jeremy
3 meses atrás
Vsevolod Stakhov
66cc2d3d88
[Fix] Fix storing of the bayes tokens
5 meses atrás
Vsevolod Stakhov
a00c667b4c
[Minor] Remove special handling
5 meses atrás
Vsevolod Stakhov
da42b91ec3
[Project] Some more work with regard to configuration
5 meses atrás
Vsevolod Stakhov
c2fd943dc8
[Project] Final things on redis cache rework
5 meses atrás
Vsevolod Stakhov
7541d281d3
[Project] Initial implementation of the lua counterpart
5 meses atrás
Vsevolod Stakhov
6d0cfe35ab
[Project] Implement text tokens storage on C++ side
6 meses atrás
Vsevolod Stakhov
38244b721b
[Project] Add store tokens support in new bayes learn
6 meses atrás
Vsevolod Stakhov
65477c3064
[Project] Try to do strings concatenation in C
6 meses atrás
Vsevolod Stakhov
b11f8216f0
[Project] Add some stats
7 meses atrás
Vsevolod Stakhov
cd568d7085
[Project] Various fixes
7 meses atrás
Vsevolod Stakhov
33cf745fb1
[Rework] Use strings for int64_t
It seems there is no easy way to use int64 in Redis Lua, hence, we have
to use strings. It's much more expensive but still some advantage over
the previous schema.
7 meses atrás
Vsevolod Stakhov
fcf2c2bb48
[Minor] Fix keys name
7 meses atrás
Vsevolod Stakhov
752414a1f5
[Project] Add some basic learning
7 meses atrás
Vsevolod Stakhov
0d993187c1
[Project] Add bayes learn script
7 meses atrás
Vsevolod Stakhov
548251ac7e
[Project] Optimise classify script
7 meses atrás
Vsevolod Stakhov
44c6c563c2
[Project] Add classify redis script
7 meses atrás
Vsevolod Stakhov
662145d055
[Minor] Reformat all Lua code, no functional changes
11 meses atrás
Andrew Lewis
ee665b05d5
[Minor] Minor fixes for previous ratelimit changes
11 meses atrás
Vsevolod Stakhov
aa85bba867
[Fix] Try harder to clean pending bucket
Issue: #4467
1 ano atrás
Andreas Simbuerger
092940ed5b
fix: avoid double-dip of nrcpt when calculating ratelimit condition
Before this commit, rspamd would consider the number of recipients of
the current message twice when calculating the ratelimit condition.
1 ano atrás
Vsevolod Stakhov
266daff34b
[Minor] Neural: Extract lua scripts
1 ano atrás
Vsevolod Stakhov
dc9b70f7c3
[Minor] Add some more comments as we now strip them
1 ano atrás
Vsevolod Stakhov
5d8aa83eb6
[Minor] Improve style in the scripts
1 ano atrás
Vsevolod Stakhov
0dd7203ee5
[Minor] Move redis scripts from ratelimit file to simplify checks
1 ano atrás