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.
il y a 2 mois
aduernberger
ccc1716bb5
[Fix] Update is_spam in learned_ids when relearning
il y a 2 mois
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
il y a 2 mois
Lucas Rolff
458e980062
[Minor] Add selector to get rspamd_hostname
il y a 2 mois
Andrew Lewis
f824108f9e
[Minor] Cloudmark scores_symbols: convert keys to numeric values
il y a 2 mois
Vsevolod Stakhov
6fe4df00d6
[Minor] Fix some corner cases
il y a 3 mois
Vsevolod Stakhov
3737999bbc
[Feature] Cloudmark: Add scores_symbols setting
il y a 3 mois
Vsevolod Stakhov
cd0be13b20
[Feature] Allow adding X-CMAE-Score header
il y a 3 mois
Vsevolod Stakhov
87f77fb0c7
[Minor] Grr, reverse
il y a 3 mois
Vsevolod Stakhov
149e4cccf3
[Fix] Fix parsing of maps definitions
il y a 3 mois
Vsevolod Stakhov
a4de9b2ebb
[Rework] Another rework of the dkim signing logic
il y a 3 mois
Vsevolod Stakhov
3de247b318
[Rework] Allow multiple conditions for dkim signing when using vault/redis
il y a 3 mois
Vsevolod Stakhov
db0911cdb4
[Minor] Improve logging when doing signing via Vault
Issue: #4865
il y a 3 mois
Vsevolod Stakhov
ef35949188
[Fix] Change expiration logic for redis_cache
Noticed by: @jeremy
il y a 3 mois
Vsevolod Stakhov
642ca8c3a4
[Minor] Escape liquid
il y a 4 mois
Vsevolod Stakhov
33c00d4502
[Fix] Avoid stupid practice of polluting module's internal state
il y a 4 mois
Vsevolod Stakhov
7b5b413b40
[Rework] Allow custom filters in `jinja_template`
il y a 4 mois
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...
il y a 4 mois
Vsevolod Stakhov
923a70bbce
Revert "[Fix] Fix history key, as we use `{=` and not `{{` in templates"
il y a 4 mois
Vsevolod Stakhov
50e9652789
[Fix] Fix history key, as we use `{=` and not `{{` in templates
il y a 4 mois
Vsevolod Stakhov
e509f85e28
[Minor] Support keepalive and authorization
il y a 5 mois
Vsevolod Stakhov
fda5af53e8
[Minor] Proper header name
il y a 5 mois
Vsevolod Stakhov
43c789659c
[Minor] KAS: add source ip information
il y a 5 mois
Vsevolod Stakhov
500fac7fd7
[Fix] Resolve issue with bayes stat in `rspamadm` mode
il y a 5 mois
Andrew Lewis
e8a24a2ac4
[Minor] configwizard: really use LOCAL_CONFDIR
il y a 5 mois
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.
il y a 5 mois
Vsevolod Stakhov
04f6599ad7
[Minor] Add fail-safety
il y a 5 mois
Andrew Lewis
1ea7a0b88c
[Minor] rbl: fix warning
il y a 5 mois
Vsevolod Stakhov
66cc2d3d88
[Fix] Fix storing of the bayes tokens
il y a 5 mois
Petr Vaněk
0805aace80
[Minor] Fix typo in comment
il y a 5 mois
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
il y a 5 mois
Vsevolod Stakhov
a00c667b4c
[Minor] Remove special handling
il y a 5 mois
Vsevolod Stakhov
da42b91ec3
[Project] Some more work with regard to configuration
il y a 5 mois
Vsevolod Stakhov
c2fd943dc8
[Project] Final things on redis cache rework
il y a 5 mois
Vsevolod Stakhov
903b60db99
[Project] Add cache config
il y a 5 mois
Vsevolod Stakhov
7b9dd286ea
[Minor] Fix scripts invocation
il y a 5 mois
Vsevolod Stakhov
7541d281d3
[Project] Initial implementation of the lua counterpart
il y a 5 mois
Vsevolod Stakhov
48bfe90186
[Minor] Rework redis servers config parsing
il y a 5 mois
Vsevolod Stakhov
6d0cfe35ab
[Project] Implement text tokens storage on C++ side
il y a 6 mois
Vsevolod Stakhov
38244b721b
[Project] Add store tokens support in new bayes learn
il y a 6 mois
Andrew Lewis
84ee2815a5
[Minor] rbl: revisit previous change
il y a 6 mois
Vsevolod Stakhov
65477c3064
[Project] Try to do strings concatenation in C
il y a 6 mois
Andrew Lewis
fb53d4f2fd
[Minor] rbl: try harder to identify lua patterns
il y a 6 mois
Andrew Lewis
d06fc3bea3
[Feature] rbl: support disabling or replacing url_whitelist per RBL
il y a 6 mois
Andrew Lewis
4da87a5cda
[Minor] Have bayes use global redis settings
il y a 6 mois
Vsevolod Stakhov
a639c5fae0
[Minor] Fix learned stats
il y a 6 mois
Vsevolod Stakhov
b11f8216f0
[Project] Add some stats
il y a 6 mois
Vsevolod Stakhov
cd568d7085
[Project] Various fixes
il y a 6 mois
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.
il y a 6 mois
Vsevolod Stakhov
fcf2c2bb48
[Minor] Fix keys name
il y a 6 mois