Vsevolod Stakhov [Tue, 17 Jun 2025 09:32:30 +0000 (10:32 +0100)]
Release 3.12.1
* [Feature] Add /bayes/classifiers HTTP endpoint
* [Feature] Further improvements in scheduling next checks
* [Fix] Another fix for maps concurrent load
* [Fix] Do not add log tag header in milter logic
* [Fix] Do not explicitly add Connection header if it's there
* [Fix] Fix proxy headers duplication
* [Fix] Fix several issues with the lua_logger
* [Fix] Make logger more graceful when dealing with format arguments
* [Fix] Try to avoid incomplete writes
* [Rework] Eliminate maps locking
The problem is that we are trying to lock maps per backend, but periodics
are scheduled per maps. It means that locks are not consistent with what we
schedule and it really does not match the current maps processing logic.
* [CritFix] In lua-ucl disable macros and file variables by default
* [Feature] Add keep-alive support
* [Feature] Add some convenience methods
* [Feature] Add support for separate read and write servers in fuzzy check
* [Feature] Allow CDB files as external maps
* [Feature] Allow to specify Redis version
* [Feature] Allow to specify extra headers in Rspamd proxy
* [Feature] Allow to specify log tag in proxy
* [Feature] Allow to specify max log tag length for all log messages
* [Feature] Allow to use HTTPS when connection to backends in proxy
* [Feature] Output content for all maps
* [Feature] Plugin to integrate with Contextal platform
* [Feature] Show all maps status
* [Fix] Add fail check for cfg transform for some corner cases
* [Fix] Add header with reason everytime (not only for ham) and use correct value for header
* [Fix] Add null check for master_conn->up in proxy backend error handler
* [Fix] Allow 'Hash' in Access-Control-Allow-Headers
* [Fix] Arc: Use tonumber when comparing
* [Fix] As we have replxx library, always use it
* [Fix] Backport some issues from libucl
* [Fix] Filter invalid domains in fuzzy extra data
* [Fix] Fix maps ids
* [Fix] Fix race condition in maps loading by unlocking backend on switch
* [Fix] Fix static maps description passing
* [Fix] Fix variable propagation (no functional change)
* [Fix] Fix various issues
* [Fix] Greylist: Improve body hash calculations
* [Fix] Known senders: More recipients test logic
* [Fix] Known senders: Use the same logic as in the replies module
* [Fix] Prevent crashes when accessing upstream address in self-scan mode
* [Fix] Really fix local objects filtering, sigh...
* [Fix] Update default URL for openphish
* [Fix] Use bundled libfmt everywhere
* [Fix] Use safe parsers everywhere except configuration
* [Fix] correct logic error in milter_headers.lua: skip_wanted()
* [Fix] initialize ollama result table
* [Fix] libmime: declare comparators const for doctest 2.4.12 compatibility
* [Project] Modernize cmake
* [Project] Rework OSDep
* [Rework] Replies: consider all recipients and use smtp ones
* [Rework] Store shared maps data separately
* [Rework] Use locks/loaded per backend for all maps
[Fix] correct logic error in milter_headers.lua: skip_wanted()
- fix logic error in skip_wanted()
- add new functional test for this scenario
- add override settings in milter_headers.conf to support the testing
- add supporting functionality in rspamd.robot
Merge pull request #5490 from rspamd/vstakhov-ucl-fix
One of the major issues is that we should use safe parser flags for all inputs aside of the real configuration which we should really trust. It means that we need to disable macros, file variables and other UCL features when it is used to parse any potentially unsafe content. I do not treat it as a security vulnerability so far, as Rspamd operates with merely trusted content by HTTP by default, however, it is good to fix to avoid any potential future mususes or even exploits possibilities.
Jan Smutny [Fri, 25 Apr 2025 09:36:49 +0000 (11:36 +0200)]
fix(lua_redis): Improve Redis script loading
This change modifies how Rspamd handles Redis script loading across multiple
servers to improve resilience during server failures and restarts.
Previously, the system required ALL Redis servers to successfully load a script
before considering it ready for use. This caused modules to get stuck in a waiting
state when any Redis server was down, reporting errors like:
"redis script is not ready, waiting it to be loaded"
even when most servers were operational.
Key changes:
- Replace is_all_servers_ready() with is_any_server_ready() to allow operation
when at least one server has successfully loaded the script
- Reset all servers to "unsent" status when NOSCRIPT errors are encountered to
properly handle server restarts
- Ensure script loading is retried appropriately on reconnection
This fix allows Rspamd to continue operating when some Redis servers are temporarily
unavailable and to recover gracefully when servers rejoin the pool.