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 miesięcy temu
aduernberger
ccc1716bb5
[Fix] Update is_spam in learned_ids when relearning
2 miesięcy temu
Lucas Rolff
104cf0cfd7
[Minor] Move hostname resolution up to cache it
Instead of calling get_hostname() for every processed message, we instead reuse the variable value from rspamd boot time
2 miesięcy temu
Lucas Rolff
458e980062
[Minor] Add selector to get rspamd_hostname
2 miesięcy temu
Andrew Lewis
f824108f9e
[Minor] Cloudmark scores_symbols: convert keys to numeric values
2 miesięcy temu
Vsevolod Stakhov
6fe4df00d6
[Minor] Fix some corner cases
3 miesięcy temu
Vsevolod Stakhov
3737999bbc
[Feature] Cloudmark: Add scores_symbols setting
3 miesięcy temu
Vsevolod Stakhov
cd0be13b20
[Feature] Allow adding X-CMAE-Score header
3 miesięcy temu
Vsevolod Stakhov
87f77fb0c7
[Minor] Grr, reverse
3 miesięcy temu
Vsevolod Stakhov
149e4cccf3
[Fix] Fix parsing of maps definitions
3 miesięcy temu
Vsevolod Stakhov
a4de9b2ebb
[Rework] Another rework of the dkim signing logic
3 miesięcy temu
Vsevolod Stakhov
3de247b318
[Rework] Allow multiple conditions for dkim signing when using vault/redis
3 miesięcy temu
Vsevolod Stakhov
db0911cdb4
[Minor] Improve logging when doing signing via Vault
Issue: #4865
3 miesięcy temu
Vsevolod Stakhov
ef35949188
[Fix] Change expiration logic for redis_cache
Noticed by: @jeremy
3 miesięcy temu
Vsevolod Stakhov
642ca8c3a4
[Minor] Escape liquid
4 miesięcy temu
Vsevolod Stakhov
33c00d4502
[Fix] Avoid stupid practice of polluting module's internal state
4 miesięcy temu
Vsevolod Stakhov
7b5b413b40
[Rework] Allow custom filters in `jinja_template`
4 miesięcy temu
Vsevolod Stakhov
269243987f
[Fix] Allow different template expansion parameters
Probably one of the most dirty hacks I've used in the Lua code in Rspamd...
4 miesięcy temu
Vsevolod Stakhov
923a70bbce
Revert "[Fix] Fix history key, as we use `{=` and not `{{` in templates"
4 miesięcy temu
Vsevolod Stakhov
50e9652789
[Fix] Fix history key, as we use `{=` and not `{{` in templates
4 miesięcy temu
Vsevolod Stakhov
e509f85e28
[Minor] Support keepalive and authorization
5 miesięcy temu
Vsevolod Stakhov
fda5af53e8
[Minor] Proper header name
5 miesięcy temu
Vsevolod Stakhov
43c789659c
[Minor] KAS: add source ip information
5 miesięcy temu
Vsevolod Stakhov
500fac7fd7
[Fix] Resolve issue with bayes stat in `rspamadm` mode
5 miesięcy temu
Andrew Lewis
e8a24a2ac4
[Minor] configwizard: really use LOCAL_CONFDIR
5 miesięcy temu
Alexander Moisseev
c8452b009d
[Rework] Breaking: Do not report module as action
in the /history response since we have the `passthrough_module` key
for that purpose.
While that might be handy in some situations,
mixing actions and module names is confusing in general.
5 miesięcy temu
Vsevolod Stakhov
04f6599ad7
[Minor] Add fail-safety
5 miesięcy temu
Andrew Lewis
1ea7a0b88c
[Minor] rbl: fix warning
5 miesięcy temu
Vsevolod Stakhov
66cc2d3d88
[Fix] Fix storing of the bayes tokens
5 miesięcy temu
Petr Vaněk
0805aace80
[Minor] Fix typo in comment
5 miesięcy temu
Petr Vaněk
aaf4373418
[Fix] Use short comments rather than long one
Rspamd fails to start with Lua-5.1 because long comment does not allow
nesting, see [1]. This change replaces it to short comments in order to
fix the issue but preserves this part as comment in docs.
[1] https://www.lua.org/manual/5.1/manual.html#7.1
Bug: https://bugs.gentoo.org/922522
Fixes: b189c9fea6
("[Minor] lua_maps docs: apply formatting")
Fixes: https://github.com/rspamd/rspamd/issues/4784
5 miesięcy temu
Vsevolod Stakhov
a00c667b4c
[Minor] Remove special handling
5 miesięcy temu
Vsevolod Stakhov
da42b91ec3
[Project] Some more work with regard to configuration
5 miesięcy temu
Vsevolod Stakhov
c2fd943dc8
[Project] Final things on redis cache rework
5 miesięcy temu
Vsevolod Stakhov
903b60db99
[Project] Add cache config
5 miesięcy temu
Vsevolod Stakhov
7b9dd286ea
[Minor] Fix scripts invocation
5 miesięcy temu
Vsevolod Stakhov
7541d281d3
[Project] Initial implementation of the lua counterpart
5 miesięcy temu
Vsevolod Stakhov
48bfe90186
[Minor] Rework redis servers config parsing
5 miesięcy temu
Vsevolod Stakhov
6d0cfe35ab
[Project] Implement text tokens storage on C++ side
6 miesięcy temu
Vsevolod Stakhov
38244b721b
[Project] Add store tokens support in new bayes learn
6 miesięcy temu
Andrew Lewis
84ee2815a5
[Minor] rbl: revisit previous change
6 miesięcy temu
Vsevolod Stakhov
65477c3064
[Project] Try to do strings concatenation in C
6 miesięcy temu
Andrew Lewis
fb53d4f2fd
[Minor] rbl: try harder to identify lua patterns
6 miesięcy temu
Andrew Lewis
d06fc3bea3
[Feature] rbl: support disabling or replacing url_whitelist per RBL
6 miesięcy temu
Andrew Lewis
4da87a5cda
[Minor] Have bayes use global redis settings
6 miesięcy temu
Vsevolod Stakhov
a639c5fae0
[Minor] Fix learned stats
6 miesięcy temu
Vsevolod Stakhov
b11f8216f0
[Project] Add some stats
6 miesięcy temu
Vsevolod Stakhov
cd568d7085
[Project] Various fixes
6 miesięcy temu
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.
6 miesięcy temu
Vsevolod Stakhov
fcf2c2bb48
[Minor] Fix keys name
6 miesięcy temu