]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Feature] Auto-mark whitelist symbols with SYMBOL_TYPE_FINE flag 5769/head
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 29 Nov 2025 14:24:36 +0000 (14:24 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 29 Nov 2025 14:24:36 +0000 (14:24 +0000)
commite8c0a9e5339d8960f493a6233cf1f4d6fbf7132e
tree576a44ec717bc6515e7862910f8f01e2601ad0ec
parent98402b7e8bb1355350ec448441f798e65a39369f
[Feature] Auto-mark whitelist symbols with SYMBOL_TYPE_FINE flag

This change ensures that symbols with negative weight and symbols used
in whitelist composites (composites with negative score) will always
execute regardless of whether the reject threshold has been reached.

Previously, when the early-stop optimization kicked in after reaching
the reject score, whitelist symbols could be skipped, leading to
potential false positives where emails should have been whitelisted.

Changes:
- Symbols with negative weight are automatically marked as FINE during
  config validation in symcache::validate()
- New rspamd_composites_mark_whitelist_deps() function traverses all
  composites with negative score and marks their constituent symbols
  as FINE (with transitive expansion for nested composites)
- New C API rspamd_symcache_set_symbol_fine() to programmatically set
  the FINE flag with proper parent/child propagation
- FINE flag is properly synchronized between virtual symbols and their
  parent symbols
src/libserver/cfg_utils.cxx
src/libserver/composites/composites.h
src/libserver/composites/composites_internal.hxx
src/libserver/composites/composites_manager.cxx
src/libserver/rspamd_symcache.h
src/libserver/symcache/symcache_c.cxx
src/libserver/symcache/symcache_impl.cxx