]> git.ipfire.org Git - thirdparty/rspamd.git/log
thirdparty/rspamd.git
2 days agoMerge pull request #5722 from rspamd/cursor/RSP-291-fix-dmarc-external-map-callback... master
Vsevolod Stakhov [Wed, 5 Nov 2025 08:28:47 +0000 (08:28 +0000)] 
Merge pull request #5722 from rspamd/cursor/RSP-291-fix-dmarc-external-map-callback-0b4b

Fix dmarc external map callback

2 days agoMerge pull request #5725 from moisseev/feature/dark-mode
Vsevolod Stakhov [Tue, 4 Nov 2025 15:07:20 +0000 (15:07 +0000)] 
Merge pull request #5725 from moisseev/feature/dark-mode

[Feature] WebUI: Implement dark mode

2 days ago[Fix] Fix OpenBSD kinfo_proc structure member names
Vsevolod Stakhov [Tue, 4 Nov 2025 13:45:37 +0000 (13:45 +0000)] 
[Fix] Fix OpenBSD kinfo_proc structure member names

OpenBSD uses p_vm_* member names similar to NetBSD, not FreeBSD's ki_* names.
Separate OpenBSD implementation from FreeBSD to use correct structure members.

2 days ago[Fix] Disable Hyperscan on OpenBSD and fix zstd package name on FreeBSD
Vsevolod Stakhov [Tue, 4 Nov 2025 13:28:36 +0000 (13:28 +0000)] 
[Fix] Disable Hyperscan on OpenBSD and fix zstd package name on FreeBSD

- OpenBSD: Disable Hyperscan (not available), remove from dependencies
- FreeBSD: Fix zstd package name (zstd not libzstd)

2 days ago[Feature] Fix BSD workflow package installation and update OS versions
Vsevolod Stakhov [Tue, 4 Nov 2025 13:02:12 +0000 (13:02 +0000)] 
[Feature] Fix BSD workflow package installation and update OS versions

- FreeBSD: Add IGNORE_OSVERSION=yes to handle package version mismatches, update to 14.3/13.5
- OpenBSD: Set PKG_PATH for package repository, fix perl package name, update to 7.8/7.7/7.6
- Use latest stable versions of both operating systems

2 days agoMerge pull request #5718 from fatalbanana/sync_psl
Vsevolod Stakhov [Tue, 4 Nov 2025 12:48:02 +0000 (12:48 +0000)] 
Merge pull request #5718 from fatalbanana/sync_psl

Sync public suffix list automatically

2 days agoMerge pull request #5729 from rspamd/vstakhov-new-build-workflows
Vsevolod Stakhov [Tue, 4 Nov 2025 12:46:50 +0000 (12:46 +0000)] 
Merge pull request #5729 from rspamd/vstakhov-new-build-workflows

[Feature] Add/improve BSD build workflows with Lua version selection

2 days agoMerge pull request #5728 from rspamd/vstakhov-fix-spawn
Vsevolod Stakhov [Tue, 4 Nov 2025 12:46:04 +0000 (12:46 +0000)] 
Merge pull request #5728 from rspamd/vstakhov-fix-spawn

[Fix] Keep srv events active during shutdown to track auxiliary processes

2 days ago[Fix] Remove -j flag from ninja in all BSD workflows 5729/head
Vsevolod Stakhov [Tue, 4 Nov 2025 12:39:00 +0000 (12:39 +0000)] 
[Fix] Remove -j flag from ninja in all BSD workflows

Let ninja automatically determine optimal parallelism instead of
using sysctl which may not be available or in PATH on all BSD systems.

Ninja uses (CPU cores + 2) by default which is optimal for most cases.

2 days ago[Fix] NetBSD workflow: setup pkgin and PKG_PATH before installing packages
Vsevolod Stakhov [Tue, 4 Nov 2025 12:11:49 +0000 (12:11 +0000)] 
[Fix] NetBSD workflow: setup pkgin and PKG_PATH before installing packages

The pkg_add command requires PKG_PATH to be set in NetBSD 10.0.
Install and use pkgin for easier binary package management.

Changes:
- Set PKG_PATH to NetBSD CDN repository
- Install pkgin using /usr/sbin/pkg_add
- Use pkgin for all package installations
- Change perl5 to perl (correct package name)
- Add || true for non-critical package installation failures

2 days ago[Feature] Add/improve BSD build workflows with Lua version selection
Vsevolod Stakhov [Tue, 4 Nov 2025 12:01:10 +0000 (12:01 +0000)] 
[Feature] Add/improve BSD build workflows with Lua version selection

Add comprehensive GitHub Actions workflows for BSD systems with the ability
to select Lua version (LuaJIT, Lua 5.1, 5.3, 5.4).

NetBSD workflow improvements:
- Add Lua version selection (luajit, lua51, lua53, lua54)
- Fix missing dependencies (libarchive, zstd, xxhash, file)
- Remove || true from pkg_add to catch installation failures
- Add -DENABLE_HYPERSCAN=OFF (not available on NetBSD)
- Add -DSYSTEM_ZSTD=ON and -DSYSTEM_XXHASH=ON flags
- Add conditional ENABLE_LUAJIT based on Lua version selection
- Add NetBSD 9.4 to supported versions
- Fix test executable paths (add ./ prefix)

New FreeBSD workflow:
- Support FreeBSD 14.2, 13.4, 13.3
- Lua version selection (luajit, lua51, lua53, lua54)
- Full dependency list including hyperscan
- Enable hyperscan support (-DENABLE_HYPERSCAN=ON)
- Use system zstd and xxhash libraries
- Proper pkg update before installation

New OpenBSD workflow:
- Support OpenBSD 7.6, 7.5, 7.4
- Lua version selection (luajit, lua51, lua53)
- Full dependency list including hyperscan
- Enable hyperscan support
- Disable jemalloc (-DENABLE_JEMALLOC=OFF)
- Use OpenBSD-specific package names (icu4c, perl-5, lua%5.x)
- Use system zstd and xxhash libraries

All workflows:
- Use workflow_dispatch trigger for manual execution
- Allow selection of OS version and Lua version
- Use vmactions VMs for BSD testing
- Run both C++ and Lua unit tests
- Use Ninja build system for faster compilation

This provides comprehensive testing across different BSD platforms and
Lua versions, ensuring Rspamd builds correctly on various configurations.

2 days agoMerge pull request #5726 from rspamd/cursor/RSP-294-fix-rspamd-netbsd-build-breakage...
Vsevolod Stakhov [Tue, 4 Nov 2025 11:42:42 +0000 (11:42 +0000)] 
Merge pull request #5726 from rspamd/cursor/RSP-294-fix-rspamd-netbsd-build-breakage-bbbf

Fix rspamd netbsd build breakage

2 days ago[Minor] Address review comments 5726/head
Vsevolod Stakhov [Tue, 4 Nov 2025 11:38:10 +0000 (11:38 +0000)] 
[Minor] Address review comments

2 days ago[Minor] WebUI: Add comment for removeEventListener 5725/head
Alexander Moisseev [Tue, 4 Nov 2025 11:21:26 +0000 (14:21 +0300)] 
[Minor] WebUI: Add comment for removeEventListener

Document that unconditional removeEventListener call is safe per MDN spec.

2 days agoPotential fix for code scanning alert no. 176: Workflow does not contain permissions
Vsevolod Stakhov [Tue, 4 Nov 2025 11:08:05 +0000 (11:08 +0000)] 
Potential fix for code scanning alert no. 176: Workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2 days agoAdd NetBSD build workflow
Cursor Agent [Tue, 4 Nov 2025 11:06:43 +0000 (11:06 +0000)] 
Add NetBSD build workflow

Co-authored-by: v <v@rspamd.com>
2 days ago[Fix] Keep srv events active during shutdown to track auxiliary processes 5728/head
Vsevolod Stakhov [Tue, 4 Nov 2025 10:54:06 +0000 (10:54 +0000)] 
[Fix] Keep srv events active during shutdown to track auxiliary processes

When Rspamd shuts down with auxiliary processes running (e.g., neural network
training spawned by workers), the main process was stopping srv_pipe event
handlers immediately after sending SIGTERM to workers. This prevented workers
from sending RSPAMD_SRV_ON_FORK notifications when their auxiliary child
processes terminated, causing these children to remain tracked indefinitely.

The main process would then hang for 90 seconds waiting for already-dead
processes that it couldn't properly clean up from the workers hash table.

Root cause analysis:
- Direct workers have ev_child watchers and are removed via SIGCHLD handler
- Auxiliary processes (fork from workers) have NO ev_child watchers
- They are removed ONLY via srv_pipe notifications (RSPAMD_SRV_ON_FORK)
- Stopping srv events during shutdown breaks this notification channel

The original stop_srv_ev code was added in 2019 (commit eafdd221) to avoid
"false notifications" during a major refactoring. However, this is no longer
an issue because:
1. srv_ev handlers automatically stop on EOF when worker pipes close
2. There is no risk of duplicate notifications
3. Auxiliary processes critically need these events to report termination

Solution: Remove the stop_srv_ev call from rspamd_term_handler. This allows
workers to continue sending process termination notifications during shutdown.
The srv_ev handlers will stop naturally when workers close their pipes.

Fixes: #5689, #5694
2 days agofeat: Add NetBSD memory usage support
Cursor Agent [Tue, 4 Nov 2025 10:24:00 +0000 (10:24 +0000)] 
feat: Add NetBSD memory usage support

Co-authored-by: v <v@rspamd.com>
2 days ago[Minor] WebUI: Fix theme toggle default to 'auto'
Alexander Moisseev [Tue, 4 Nov 2025 10:16:06 +0000 (13:16 +0300)] 
[Minor] WebUI: Fix theme toggle default to 'auto'

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
3 days ago[Feature] WebUI: Implement dark mode
Alexander Moisseev [Sun, 2 Nov 2025 13:14:21 +0000 (16:14 +0300)] 
[Feature] WebUI: Implement dark mode

3 days agoMerge pull request #5724 from rspamd/vstakhov-hyperscan-version
Vsevolod Stakhov [Mon, 3 Nov 2025 18:36:49 +0000 (18:36 +0000)] 
Merge pull request #5724 from rspamd/vstakhov-hyperscan-version

[Fix] Use runtime Hyperscan version for database validation

3 days ago[Fix] Recreate invalid unserialized Hyperscan cache files on version mismatch 5724/head
Vsevolod Stakhov [Mon, 3 Nov 2025 14:50:16 +0000 (14:50 +0000)] 
[Fix] Recreate invalid unserialized Hyperscan cache files on version mismatch

When Hyperscan library is updated, previously cached .unser files become
invalid due to version mismatch. Previously, these files would remain
unusable, forcing fallback to slower deserialization on every load.

This commit adds automatic detection and recreation of invalid unserialized
files:
- Extract file creation logic into create_unserialized_file() helper function
- Add error handler that deletes and recreates invalid .unser files
- Maintain file locking protection against concurrent process access
- Fall back to serialized version if recreation fails

This ensures cache files are automatically updated after Hyperscan upgrades
while protecting against race conditions in multi-process environments.

3 days ago[Fix] Use runtime Hyperscan version instead of compile-time version for database...
Vsevolod Stakhov [Mon, 3 Nov 2025 11:05:31 +0000 (11:05 +0000)] 
[Fix] Use runtime Hyperscan version instead of compile-time version for database validation

The issue was that the database version check used HS_DB_VERSION macro defined
in headers at compile time, while Hyperscan .so library writes the version from
its own headers. When the system updates the Hyperscan package but Rspamd isn't
recompiled, this causes a version mismatch and database validation fails.

The fix calls hs_version() at runtime to get the actual library version and uses
that for validation instead. This ensures compatibility when the Hyperscan library
is updated independently.

4 days ago[Fix] Fix allocator mismatches with jemalloc
Vsevolod Stakhov [Sun, 2 Nov 2025 19:29:38 +0000 (19:29 +0000)] 
[Fix] Fix allocator mismatches with jemalloc

Resolve crashes caused by mixing system malloc and jemalloc allocators.
The issue occurred when getline() and hiredis used system malloc, but
rspamd's free() used jemalloc, causing segmentation faults on macOS and
potentially other platforms.

Changes:
- Add rspamd_getline() wrapper using g_malloc/g_realloc/g_free to avoid
  system malloc in getline()
- Replace getline() with rspamd_getline() in url.c, dns.c, lua_repl.c
- Fix memory leak in lua_repl.c by freeing input buffer on exit
- Configure hiredis allocators to use glib functions (jemalloc) in
  rspamd_init_libs()

This ensures all memory operations use the same allocator (jemalloc)
throughout rspamd, preventing allocator mismatch crashes.

5 days agoMerge pull request #5721 from rspamd/cursor/RSP-284-fix-rspamd-nameserver-round-robin...
Vsevolod Stakhov [Sun, 2 Nov 2025 07:59:50 +0000 (07:59 +0000)] 
Merge pull request #5721 from rspamd/cursor/RSP-284-fix-rspamd-nameserver-round-robin-294a

Fix rspamd nameserver round robin

5 days ago[Fix] Fix allocator mismatches in libucl
Vsevolod Stakhov [Sat, 1 Nov 2025 22:14:07 +0000 (22:14 +0000)] 
[Fix] Fix allocator mismatches in libucl

Resolve crashes caused by mixing jemalloc and system malloc allocators
in libucl. The issue occurred when memory allocated with one allocator
(e.g., strdup using system malloc) was freed with another (e.g., jemalloc's
free), causing segmentation faults.

Changes:
- Add UCL_REALLOC and UCL_STRDUP macros to ucl.h for consistent allocation
- Replace all strdup/malloc/realloc/free calls with UCL_* macros in:
  - Variable and macro registration (ucl_parser.c)
  - Parser state management (ucl_util.c)
  - Object copying and trash stack operations (ucl_util.c)
  - URL fetching - fix critical bug where malloc'd buffers were freed
    with ucl_munmap (munmap) instead of free (ucl_util.c)

This ensures all memory operations use the same allocator throughout libucl,
preventing allocator mismatch crashes on systems using jemalloc.

5 days agoRefactor DMARC reporting to use helper functions and async maps 5722/head
Cursor Agent [Sat, 1 Nov 2025 12:58:16 +0000 (12:58 +0000)] 
Refactor DMARC reporting to use helper functions and async maps

Co-authored-by: v <v@rspamd.com>
5 days ago[Fix] Fix rspamd nameserver round-robin when using /etc/resolv.conf 5721/head
Cursor Agent [Sat, 1 Nov 2025 12:56:18 +0000 (12:56 +0000)] 
[Fix] Fix rspamd nameserver round-robin when using /etc/resolv.conf

When nameservers are parsed from /etc/resolv.conf, rspamd was setting
the upstream rotation strategy to RSPAMD_UPSTREAM_MASTER_SLAVE, which
caused it to only use the first nameserver unless it failed.

This behavior was inconsistent with the documented round-robin strategy
and with the behavior when nameservers are explicitly configured via
the configuration file.

Fixed by changing the rotation strategy to RSPAMD_UPSTREAM_ROUND_ROBIN
when parsing /etc/resolv.conf, matching the expected behavior.

Fixes RSP-284

5 days agoMerge pull request #5720 from rspamd/vstakhov-fuzzy-html-conf
Vsevolod Stakhov [Sat, 1 Nov 2025 12:21:57 +0000 (12:21 +0000)] 
Merge pull request #5720 from rspamd/vstakhov-fuzzy-html-conf

Add structured fuzzy checks configuration

5 days ago[Minor] Fix ping command 5720/head
Vsevolod Stakhov [Sat, 1 Nov 2025 12:02:46 +0000 (12:02 +0000)] 
[Minor] Fix ping command

5 days ago[Minor] Use khash instead of GHashTable in fuzzy_check.c
Vsevolod Stakhov [Sat, 1 Nov 2025 11:01:10 +0000 (11:01 +0000)] 
[Minor] Use khash instead of GHashTable in fuzzy_check.c

5 days ago[Feature] Add structured fuzzy checks configuration
Vsevolod Stakhov [Thu, 30 Oct 2025 20:46:41 +0000 (20:46 +0000)] 
[Feature] Add structured fuzzy checks configuration

- support new checks object while preserving legacy flags

- update lua helper and default config example to leverage structured checks

6 days agoMerge pull request #5690 from heptalium/meissner-update-lua-docu
Vsevolod Stakhov [Fri, 31 Oct 2025 18:26:50 +0000 (18:26 +0000)] 
Merge pull request #5690 from heptalium/meissner-update-lua-docu

Add missing parameters to documentation of rspamd_config:register_symbol function

7 days agoMerge pull request #5717 from moisseev/webui
Vsevolod Stakhov [Thu, 30 Oct 2025 20:46:16 +0000 (20:46 +0000)] 
Merge pull request #5717 from moisseev/webui

[Minor] Replace deprecated `alert-error` class and update D3 libs

7 days ago[Feature] Allow HTML-only fuzzy rules
Vsevolod Stakhov [Thu, 30 Oct 2025 18:43:01 +0000 (18:43 +0000)] 
[Feature] Allow HTML-only fuzzy rules

- add per-rule text_hashes toggle so HTML shingles can stand alone

- adjust lua/C logic and move HTML example into main fuzzy config

7 days ago[Test] Sync public suffix list automatically 5718/head
Andrew Lewis [Thu, 30 Oct 2025 18:07:52 +0000 (20:07 +0200)] 
[Test] Sync public suffix list automatically

7 days ago[Minor] Replace deprecated `alert-error` class 5717/head
Alexander Moisseev [Thu, 30 Oct 2025 10:50:53 +0000 (13:50 +0300)] 
[Minor] Replace deprecated `alert-error` class

Replaces the old Bootstrap 2.x `alert-error` class with the modern
`alert-danger` equivalent.

Also removes unused `.alert h4` rules that are no longer used in the UI.

This improves compatibility and ensures consistent styling with Bootstrap â‰¥3.

7 days ago[Minor] Update libucl with automatic stack management
Vsevolod Stakhov [Thu, 30 Oct 2025 10:17:31 +0000 (10:17 +0000)] 
[Minor] Update libucl with automatic stack management

Merge changes from upstream libucl commit 26bec99:
- Add UCL_STACK_AUTOMATIC flag for automatic stack preservation
- Modify stack cleanup to conditionally preserve automatic stacks
- Enable parsing of included files without outer braces

This allows parsing of UCL configurations that include files with
content like 'key = value;' without requiring explicit braces,
improving compatibility with various UCL file formats.

8 days agoMerge pull request #5714 from rspamd/cursor/RSP-290-fix-bayes-expiry-module-not-enabl...
Vsevolod Stakhov [Thu, 30 Oct 2025 09:08:13 +0000 (09:08 +0000)] 
Merge pull request #5714 from rspamd/cursor/RSP-290-fix-bayes-expiry-module-not-enabled-bug-63ff

Fix bayes_expiry module not enabled bug

8 days ago[Minor] Update bundled D3-based visualization libs
Alexander Moisseev [Thu, 30 Oct 2025 07:53:15 +0000 (10:53 +0300)] 
[Minor] Update bundled D3-based visualization libs

- **D3Evolution** 2.0.2 â†’ 2.0.3
  Improves flexibility for different themes.
- **rspamd-D3Pie** 1.1.0 â†’ 1.1.1
  Fixes a bug where the color was not applied to the label of the placeholder slice.

8 days agoMerge pull request #5716 from rspamd/fix-tcp-dns-garbage
Vsevolod Stakhov [Wed, 29 Oct 2025 18:20:24 +0000 (18:20 +0000)] 
Merge pull request #5716 from rspamd/fix-tcp-dns-garbage

[Fix] Fix TCP DNS uninitialized memory leak

8 days agoMerge pull request #5709 from rspamd/vstakhov-leaks-plug
Vsevolod Stakhov [Wed, 29 Oct 2025 13:56:49 +0000 (13:56 +0000)] 
Merge pull request #5709 from rspamd/vstakhov-leaks-plug

Plugging memory leaks

Burn test successful

8 days ago[Fix] Fix TCP DNS uninitialized memory leak 5716/head
Vsevolod Stakhov [Wed, 29 Oct 2025 13:45:38 +0000 (13:45 +0000)] 
[Fix] Fix TCP DNS uninitialized memory leak

When rescheduling a DNS request from UDP to TCP, the code was using
req->packet_len (allocated buffer size) instead of req->pos (actual
packet size) to copy and send the DNS packet. This caused random
garbage from uninitialized memory to be appended to TCP DNS queries.

The bug was particularly noticeable with short queries like TXT records,
where the allocated buffer could be 2-3x larger than the actual packet.

8 days agoRefactor: Improve Redis server discovery for Bayes 5714/head
Cursor Agent [Wed, 29 Oct 2025 13:14:54 +0000 (13:14 +0000)] 
Refactor: Improve Redis server discovery for Bayes

Co-authored-by: v <v@rspamd.com>
8 days ago[Minor] One more leak fix 5709/head
Vsevolod Stakhov [Wed, 29 Oct 2025 12:34:57 +0000 (12:34 +0000)] 
[Minor] One more leak fix

8 days ago[Feature] Add ASAN leak analyzer script
Vsevolod Stakhov [Wed, 29 Oct 2025 11:19:25 +0000 (11:19 +0000)] 
[Feature] Add ASAN leak analyzer script

8 days ago[Minor] Fix logger order finalization
Vsevolod Stakhov [Wed, 29 Oct 2025 10:51:14 +0000 (10:51 +0000)] 
[Minor] Fix logger order finalization

8 days ago[Minor] Fix double free in fuzzy storage
Vsevolod Stakhov [Wed, 29 Oct 2025 10:19:18 +0000 (10:19 +0000)] 
[Minor] Fix double free in fuzzy storage

9 days ago[Fix] Fix memory leak in fuzzy storage khash tables
Vsevolod Stakhov [Tue, 28 Oct 2025 15:51:51 +0000 (15:51 +0000)] 
[Fix] Fix memory leak in fuzzy storage khash tables

In init_fuzzy(), two khash tables were created but their destructors
were not added to the config mempool:
- ctx->default_forbidden_ids
- ctx->weak_ids

While these tables were destroyed in the worker cleanup code (before
exit), this cleanup doesn't run during configtest, causing a memory leak.

Fix: Add mempool destructors for both hash tables, similar to how
ctx->keys and ctx->errors_ips are handled. This ensures proper cleanup
in all scenarios including configtest.

9 days ago[Fix] Fix memory leak in address parsing for *-any addresses
Vsevolod Stakhov [Tue, 28 Oct 2025 15:01:21 +0000 (15:01 +0000)] 
[Fix] Fix memory leak in address parsing for *-any addresses

In rspamd_parse_host_port_priority(), when handling '*' (any address),
the GPtrArray was created with a conditional destructor:

    pool == NULL ? NULL : (GDestroyNotify) rspamd_inet_address_free

This meant that when pool == NULL, the array had NO destructor for
elements. Later, when rspamd_upstreams_add_upstream() copied addresses
and called g_ptr_array_free(addrs, TRUE), the original address objects
were not freed, causing a memory leak.

Fix: Always set the destructor to rspamd_inet_address_free, regardless
of pool presence. The destructor will properly free address elements
when the array is freed, while mempool destructor (if pool exists)
will handle freeing the array itself.

9 days ago[Fix] Fix memory leak in upstream address parsing
Vsevolod Stakhov [Tue, 28 Oct 2025 14:37:36 +0000 (14:37 +0000)] 
[Fix] Fix memory leak in upstream address parsing

When parsing upstream addresses in rspamd_upstreams_add_upstream(),
the GPtrArray 'addrs' was not properly freed in several cases:

1. For service= variant: destructor was not added to mempool
2. After copying addresses to upstream: array was not freed when
   ups->ctx is NULL
3. On parse failure: addrs was not freed

This commit adds proper cleanup:
- Add mempool destructor for service= variant when ctx exists
- Free addrs after copying addresses if no ctx (not managed by mempool)
- Free addrs on parse failure if not managed by mempool
- Set addrs = NULL after freeing to avoid dangling pointer

The fix is careful about mempool-managed vs manual cleanup to avoid
double-free issues, especially important since upstreams can be called
from destructor functions.

9 days ago[Rework] Add CFG_REF_* macros with debug logging for config refcounting
Vsevolod Stakhov [Tue, 28 Oct 2025 14:23:10 +0000 (14:23 +0000)] 
[Rework] Add CFG_REF_* macros with debug logging for config refcounting

Introduce specialized refcount macros for rspamd_config that provide
debug-level logging for better debugging of configuration lifecycle:

- CFG_REF_INIT_RETAIN: Initialize refcount to 1
- CFG_REF_RETAIN: Increment refcount
- CFG_REF_RELEASE: Decrement refcount and destroy if reaches 0

These macros use G_LOG_LEVEL_DEBUG to avoid cluttering info logs
with refcounting details, while still providing visibility when
debugging config lifetime issues.

Also update all workers and components to use the new CFG_REF_* macros
instead of generic REF_* macros for better tracking.

9 days ago[Refactor] Move OpenSSL providers from global to libs_ctx
Vsevolod Stakhov [Tue, 28 Oct 2025 11:30:28 +0000 (11:30 +0000)] 
[Refactor] Move OpenSSL providers from global to libs_ctx

Previously, OpenSSL 3.0+ providers (legacy and default) were stored in
static global variables. This is not a good architecture as these resources
should be managed alongside other library contexts.

This commit refactors the code to store SSL providers in the
rspamd_external_libs_ctx structure:
- Add ssl_legacy_provider and ssl_default_provider fields to libs_ctx
- Pass libs_ctx to rspamd_openssl_maybe_init() to store providers there
- Remove rspamd_openssl_cleanup() function - cleanup now happens in
  rspamd_deinit_libs() when the libs_ctx is freed
- Remove global variables and manual cleanup calls

This provides better resource management and clearer ownership of
OpenSSL provider lifecycle.

9 days agoFix UCL object memory leak in Lua integration
Vsevolod Stakhov [Tue, 28 Oct 2025 10:54:39 +0000 (10:54 +0000)] 
Fix UCL object memory leak in Lua integration

When UCL objects are passed to Lua via ucl_object_push_lua_unwrapped(),
the reference count is incremented but the garbage collector finalizer
was not being called, causing memory leaks.

The issue is that Lua 5.1/LuaJIT does not support __gc metamethod for
tables, only for userdata. This fix adds proper garbage collection
support for both Lua versions:

- For Lua 5.1/LuaJIT: Add __gc metamethod to the userdata stored in
  the table at index [0], which properly triggers reference cleanup
- For Lua 5.2+: Use the existing table __gc metamethod which works
  correctly in newer Lua versions

This ensures that ucl_object_unref() is called exactly once when the
Lua wrapper is garbage collected, preventing memory leaks.

10 days agoMerge pull request #5707 from fatalbanana/rspamadm_dnstool
Vsevolod Stakhov [Mon, 27 Oct 2025 17:39:38 +0000 (17:39 +0000)] 
Merge pull request #5707 from fatalbanana/rspamadm_dnstool

[Fix] Unbreak `rspamadm dnstool`

10 days agoMerge pull request #5701 from rspamd/vstakhov-learn-scripts-improvements
Vsevolod Stakhov [Mon, 27 Oct 2025 17:38:44 +0000 (17:38 +0000)] 
Merge pull request #5701 from rspamd/vstakhov-learn-scripts-improvements

[Rework] Make Bayes learn guards configurable

10 days ago[Fix] Unbreak `rspamadm dnstool` 5707/head
Andrew Lewis [Mon, 27 Oct 2025 16:11:23 +0000 (18:11 +0200)] 
[Fix] Unbreak `rspamadm dnstool`

10 days ago[Fix] Properly cleanup OpenSSL providers to prevent memory leak
Vsevolod Stakhov [Mon, 27 Oct 2025 12:45:34 +0000 (12:45 +0000)] 
[Fix] Properly cleanup OpenSSL providers to prevent memory leak

OpenSSL 3.0+ providers (legacy and default) were loaded but never
unloaded, causing memory leaks detected by ASAN. This commit adds
proper cleanup by:
- Saving provider pointers when loading
- Creating rspamd_openssl_cleanup() function to unload providers
- Calling cleanup on main process termination

12 days agoMerge pull request #5702 from moisseev/ft-fa
Vsevolod Stakhov [Sat, 25 Oct 2025 10:00:14 +0000 (11:00 +0100)] 
Merge pull request #5702 from moisseev/ft-fa

[Rework] WebUI: Replace Glyphicons with FontAwesome SVG icons

13 days ago[Minor] Fix icon rendering race condition in tab initialization 5702/head
Alexander Moisseev [Fri, 24 Oct 2025 13:41:35 +0000 (16:41 +0300)] 
[Minor] Fix icon rendering race condition in tab initialization

Initialize FontAwesome icon replacement before activating stickyTabs
to ensure FooTable icons are properly converted on initial tab load.

Previously, stickyTabs would activate #status_nav before the FontAwesome
MutationObserver was set up, causing icons to render as unstyled fooicons.

13 days ago[Rework] WebUI: Replace Glyphicons with FontAwesome SVG icons
Copilot [Fri, 24 Oct 2025 11:40:42 +0000 (14:40 +0300)] 
[Rework] WebUI: Replace Glyphicons with FontAwesome SVG icons

The implementation uses a global MutationObserver watching document.body that:

-  Detects when new fooicon elements are added to the DOM
-  Detects when class attributes change on existing fooicon elements (e.g., sort icon cycling)
-  Automatically processes and replaces icons

Benefits:

✓ Sharp SVG rendering at all zoom levels (vs blurry webfonts)
✓ No font loading issues or CORS problems
✓ Reduced code footprint

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: moisseev <2275981+moisseev@users.noreply.github.com>
13 days ago[Fix] Only bypass learn when header value matches 5701/head
Vsevolod Stakhov [Fri, 24 Oct 2025 10:41:29 +0000 (11:41 +0100)] 
[Fix] Only bypass learn when header value matches

13 days ago[Rework] Make Bayes learn guards configurable
Vsevolod Stakhov [Fri, 24 Oct 2025 10:20:53 +0000 (11:20 +0100)] 
[Rework] Make Bayes learn guards configurable

2 weeks ago[Minor] Reduce info log verbosity in fuzzy_check plugin
Vsevolod Stakhov [Thu, 23 Oct 2025 15:39:56 +0000 (16:39 +0100)] 
[Minor] Reduce info log verbosity in fuzzy_check plugin

Move routine TCP connection messages to debug level to reduce log noise.
Only log TCP/UDP protocol transitions at info level in auto-switch mode,
as these represent significant operational changes that administrators
should be aware of. Configuration and encryption key setup messages also
moved to debug level.

2 weeks ago[Fix] Add explicit console logging configuration for Docker container
Vsevolod Stakhov [Thu, 23 Oct 2025 10:45:11 +0000 (11:45 +0100)] 
[Fix] Add explicit console logging configuration for Docker container

Add logging.inc to ensure rspamd logs are properly captured by
Docker when running in foreground mode.

2 weeks ago[Fix] Use static encryption keys and improve log collection
Vsevolod Stakhov [Thu, 23 Oct 2025 10:23:20 +0000 (11:23 +0100)] 
[Fix] Use static encryption keys and improve log collection

- Replace dynamic key generation with static keys to avoid LD_LIBRARY_PATH issues
- Add fallback log collection using direct docker logs commands
- Ensure complete log capture from all containers

2 weeks ago[Minor] Another try to unbreak the integration test
Vsevolod Stakhov [Thu, 23 Oct 2025 10:10:22 +0000 (11:10 +0100)] 
[Minor] Another try to unbreak the integration test

2 weeks ago[Minor] I'm so tired of china room integration test
Vsevolod Stakhov [Thu, 23 Oct 2025 09:19:27 +0000 (10:19 +0100)] 
[Minor] I'm so tired of china room integration test

2 weeks ago[Fix] Use DESTDIR pattern to fix hardcoded paths in rspamd binaries
Vsevolod Stakhov [Thu, 23 Oct 2025 08:01:17 +0000 (09:01 +0100)] 
[Fix] Use DESTDIR pattern to fix hardcoded paths in rspamd binaries

Changed build to use CMAKE_INSTALL_PREFIX=/usr (final location) with
DESTDIR for staging. This ensures paths compiled into binaries match
runtime paths in Docker container, fixing lua_util module loading.

2 weeks ago[Fix] Copy all install directories to proper system locations in Dockerfile
Vsevolod Stakhov [Wed, 22 Oct 2025 15:20:46 +0000 (16:20 +0100)] 
[Fix] Copy all install directories to proper system locations in Dockerfile

Fixed the issue where config files and other resources were not accessible
because we were copying install/* to /usr/* which put configs at /usr/etc
instead of /etc. Now explicitly copying:
- install/bin -> /usr/bin (binaries)
- install/lib -> /usr/lib (libraries)
- install/share -> /usr/share (plugins, rules, webui)
- install/etc -> /etc (configuration files)

This ensures rspamd can find all its files at standard system locations.

2 weeks ago[Fix] Allow rspamd to run as root in Docker with --insecure flag
Vsevolod Stakhov [Wed, 22 Oct 2025 14:02:43 +0000 (15:02 +0100)] 
[Fix] Allow rspamd to run as root in Docker with --insecure flag

Rspamd refuses to run as root by default. Since this is a test
environment in an isolated Docker container, we add the --insecure
flag to allow running as root user.

2 weeks ago[Fix] Add missing runtime dependencies to Dockerfile
Vsevolod Stakhov [Wed, 22 Oct 2025 10:58:04 +0000 (11:58 +0100)] 
[Fix] Add missing runtime dependencies to Dockerfile

Added libsqlite3-0 and libunwind8 which are required by rspamd
but were missing from the Docker image, causing runtime errors:
  libsqlite3.so.0: cannot open shared object file

2 weeks ago[Fix] Add ldconfig and library path configuration to Dockerfile
Vsevolod Stakhov [Wed, 22 Oct 2025 10:26:14 +0000 (11:26 +0100)] 
[Fix] Add ldconfig and library path configuration to Dockerfile

The rspamd shared libraries are installed in /usr/lib/rspamd/ which is not
in the default dynamic linker search path. This causes the error:
  librspamd-server.so: cannot open shared object file

Fixed by:
- Adding /usr/lib/rspamd to /etc/ld.so.conf.d/rspamd.conf
- Running ldconfig to update the dynamic linker cache

This ensures all rspamd shared libraries are found at runtime.

2 weeks ago[Test] Use locally built Rspamd in integration tests instead of prebuilt image
Vsevolod Stakhov [Wed, 22 Oct 2025 10:13:18 +0000 (11:13 +0100)] 
[Test] Use locally built Rspamd in integration tests instead of prebuilt image

Changed integration test setup to build and test the current code
instead of using the asan-nightly Docker image:

- Modified docker-compose.yml to use local build via Dockerfile.local
- Created Dockerfile.local with ASAN-enabled Ubuntu 24.04 base
- Removed redundant docker-compose modification step from workflow
- Added .dockerignore to exclude test data from build context

This ensures integration tests actually test the code changes being
made in pull requests, not an outdated nightly build.

2 weeks ago[Fix] Fix critical TCP fuzzy protocol bugs
Vsevolod Stakhov [Wed, 22 Oct 2025 09:30:00 +0000 (10:30 +0100)] 
[Fix] Fix critical TCP fuzzy protocol bugs

This commit fixes three critical bugs in the TCP fuzzy implementation:

1. Heap-use-after-free in connection retry (fuzzy_check.c:782)
   - Removed redundant FUZZY_TCP_RELEASE() after g_ptr_array_remove()
   - The array's free function already handles unreferencing
   - This was causing double-free when retrying failed connections

2. TCP frame write calculation error (fuzzy_check.c:1088-1094)
   - Fixed data write length calculation that included 2-byte size header
   - Was writing 2 extra garbage bytes after payload
   - Server rejected frames with "invalid frame length" errors
   - Now correctly separates header and payload byte accounting

3. Server frame length validation (fuzzy_storage.c:2683)
   - Changed limit from sizeof(struct) to FUZZY_TCP_BUFFER_LENGTH (8192)
   - Commands with extensions exceed struct size but are valid
   - Added check for zero-length frames
   - Allows proper handling of variable-length fuzzy commands

These fixes enable TCP fuzzy protocol to work correctly with parallel
message processing and commands with extensions/shingles.

2 weeks ago[Minor] Reduce dumb log level
Vsevolod Stakhov [Wed, 22 Oct 2025 08:49:17 +0000 (09:49 +0100)] 
[Minor] Reduce dumb log level

2 weeks ago[Fix] Use pure ev_timer for TCP session timeouts instead of rspamd_io_ev
Vsevolod Stakhov [Wed, 22 Oct 2025 08:02:15 +0000 (09:02 +0100)] 
[Fix] Use pure ev_timer for TCP session timeouts instead of rspamd_io_ev

Replace rspamd_io_ev with pure ev_timer for TCP session timeouts.
rspamd_io_ev is a wrapper for combined IO+timer watchers and creates
unnecessary overhead when used for pure timers:

- Changed session->timer_ev from rspamd_io_ev to ev_timer
- Simplified callback signature to native libev callback
- Use ev_timer_init/ev_timer_start/ev_timer_stop directly
- Removed unnecessary wrapper functions and struct fields

This eliminates wasted memory from dummy ev_io structs and clarifies
the separation between IO watchers and timer-only watchers.

2 weeks ago[Fix] Add platform check for netinet/tcp.h include
Vsevolod Stakhov [Wed, 22 Oct 2025 07:49:50 +0000 (08:49 +0100)] 
[Fix] Add platform check for netinet/tcp.h include

Wrap netinet/tcp.h include in HAVE_NETINET_TCP_H check for better
portability across different platforms that may not have this header.

2 weeks ago[Fix] Prevent race conditions and fd reuse bugs in fuzzy TCP connections
Vsevolod Stakhov [Wed, 22 Oct 2025 07:31:48 +0000 (08:31 +0100)] 
[Fix] Prevent race conditions and fd reuse bugs in fuzzy TCP connections

Fix critical race conditions in TCP connection management for parallel message processing:

1. Add connection to pool BEFORE starting event watcher to prevent duplicate connections
   when multiple tasks try to connect simultaneously
2. Close fd and set to -1 immediately on connection failure to prevent fd reuse bugs
3. Create fuzzy_tcp_connection_close() helper to ensure consistent cleanup
4. Set conn->fd = -1 after close in connection_free to prevent double-close

These changes prevent crashes when processing thousands of messages in parallel where:
- Multiple tasks create duplicate connections to same upstream
- OS reuses fd numbers after close, causing wrong socket operations
- Event handlers access stale fd values after connection cleanup

2 weeks agoMerge pull request #5693 from rspamd/vstakhov-mempool-rewamp
Vsevolod Stakhov [Tue, 21 Oct 2025 13:17:21 +0000 (14:17 +0100)] 
Merge pull request #5693 from rspamd/vstakhov-mempool-rewamp

Improve memory pool destructors and allocation strategies

2 weeks ago[Fix] Prevent double-free in mempool destructor cleanup 5693/head
Vsevolod Stakhov [Tue, 21 Oct 2025 10:53:19 +0000 (11:53 +0100)] 
[Fix] Prevent double-free in mempool destructor cleanup

Mark heap as destroyed after rspamd_mempool_destructors_enforce to avoid
double destruction in subsequent rspamd_mempool_delete call

2 weeks ago[Feature] Smart destructor preallocation based on pool type and statistics
Vsevolod Stakhov [Tue, 21 Oct 2025 10:41:50 +0000 (11:41 +0100)] 
[Feature] Smart destructor preallocation based on pool type and statistics

Implement intelligent preallocation strategy for destructor heap:

Long-lived pools (LONG_LIVED flag):
- Fixed preallocation: 32 destructor slots
- No statistical tracking needed (pool lives entire process lifetime)
- Covers typical module/configuration destructor counts

Short-lived pools (default):
- Statistics-based preallocation using entry point data
- Track maximum destructors seen per entry point
- Cap at 64 slots to prevent excessive preallocation
- Simplified max-tracking logic (replaces exponential growth)

Benefits:
- Long-lived: predictable memory usage, no reallocation overhead
- Short-lived: adaptive to actual usage patterns
- Reduced heap resizing operations during destructor addition
- Memory bounded (32 for long-lived, max 64 for short-lived)

Statistics updated on pool deletion to inform future allocations
from same entry point.

2 weeks ago[Optimize] Add rspamd_heap_push_slot to eliminate double allocation
Vsevolod Stakhov [Tue, 21 Oct 2025 10:34:58 +0000 (11:34 +0100)] 
[Optimize] Add rspamd_heap_push_slot to eliminate double allocation

Add rspamd_heap_push_slot() macro that allocates a slot directly in
the heap and returns a pointer to it, avoiding unnecessary copying.

Previously, memory pool destructors were allocated twice:
1. First allocated in mempool via rspamd_mempool_alloc_
2. Then copied into heap via rspamd_heap_push_safe

New approach:
- rspamd_heap_push_slot allocates zero-initialized slot in heap
- Returns pointer to the slot for direct filling
- User calls rspamd_heap_swim after filling to restore heap property

Benefits:
- Eliminates duplicate allocation of destructor structures
- Reduces memory usage (no temporary allocation in mempool)
- Better cache locality (destructor lives only in heap)
- Same pattern can be used elsewhere for efficient heap usage

Updated rspamd_mempool_add_destructor_full to use new API.

2 weeks ago[Feature] Use specialized pool types for long-lived and short-lived allocations
Vsevolod Stakhov [Tue, 21 Oct 2025 09:56:57 +0000 (10:56 +0100)] 
[Feature] Use specialized pool types for long-lived and short-lived allocations

Replace generic rspamd_mempool_new calls with specialized variants
to optimize allocation strategies based on pool lifetime.

Long-lived pools (RSPAMD_MEMPOOL_LONG_LIVED):
- server_pool (main server context, rspamadm)
- cfg_pool (configuration, 8MB)
- Module contexts (fuzzy_check, fuzzy_backend)
- Upstream context
- Radix trees
- Maps (hash, radix, regexp - 5 instances)
- Static Lua pools (url, regexp)

Short-lived pools (RSPAMD_MEMPOOL_SHORT_LIVED):
- HTTP/controller sessions
- Task pools (message processing)
- Milter sessions
- Proxy sessions (2 instances)
- Lua parsers (HTML, email - 2 instances)
- Lua mempool creation
- Lua worker control

Benefits:
- Long-lived pools: larger initial page size, fewer reallocations
- Short-lived pools: smaller initial size, faster allocation/deallocation
- Better memory efficiency based on usage patterns

2 weeks ago[Rework] Convert heap to fully intrusive kvec-based implementation
Vsevolod Stakhov [Tue, 21 Oct 2025 09:37:28 +0000 (10:37 +0100)] 
[Rework] Convert heap to fully intrusive kvec-based implementation

Convert the heap implementation from pointer-based to fully intrusive
design where elements are stored directly in the kvec array.

Key changes:
- Remove heap.c, convert to macro-only header implementation
- Store elements by value in kvec_t(elt_type) instead of kvec_t(elt_type *)
- Improve cache locality by eliminating pointer indirection
- Fix swim/sink operations to properly track elements during swaps
- Update rspamd_heap_pop to return pointer to popped element
- Update memory pool destructor heap to use new intrusive API
- Update heap tests for value-based element storage

Performance benefits:
- Better cache locality (elements stored contiguously)
- No per-element allocation overhead
- Reduced memory usage (no pointer array)

2 weeks ago[Feature] Improve memory pool destructors and allocation strategies
Vsevolod Stakhov [Mon, 20 Oct 2025 21:22:28 +0000 (22:22 +0100)] 
[Feature] Improve memory pool destructors and allocation strategies

This commit introduces several improvements to the memory pool subsystem:

1. Priority-based destructors using binary heap:
   - Replace linked list with min-heap for deterministic destructor ordering
   - Add rspamd_mempool_add_destructor_priority() for priority control
   - Maintain backward compatibility with existing rspamd_mempool_add_destructor()
   - Destructors now execute in priority order (lowest first)

2. Destructor statistics and preallocation:
   - Track destructor count per allocation point in entry statistics
   - Preallocate heap based on historical usage patterns
   - Adaptive sizing with configurable maximum (128 destructors)

3. Pool type differentiation:
   - Add RSPAMD_MEMPOOL_LONG_LIVED flag for configuration/global data
   - Add RSPAMD_MEMPOOL_SHORT_LIVED flag for task/temporary data
   - Optimize page sizes: 16KB minimum for long-lived, 4KB for short-lived
   - Provide convenience macros: rspamd_mempool_new_long_lived() and
     rspamd_mempool_new_short_lived()

4. Heap utility enhancements:
   - Add rspamd_min_heap_size() to query heap element count
   - Enable better integration with pool statistics

Benefits:
- Controlled resource cleanup order prevents use-after-free scenarios
- Reduced memory fragmentation for long-lived pools
- Better performance for frequently created/destroyed short-lived pools
- Automatic adaptation to actual usage patterns

2 weeks ago[Test] Ok, I can also forget '0'
Vsevolod Stakhov [Mon, 20 Oct 2025 16:07:07 +0000 (17:07 +0100)] 
[Test] Ok, I can also forget '0'

2 weeks ago[Test] It seems CC just can't understand how to fix this
Vsevolod Stakhov [Mon, 20 Oct 2025 15:57:22 +0000 (16:57 +0100)] 
[Test] It seems CC just can't understand how to fix this

2 weeks ago[Test] Disable milter mode in proxy worker for integration tests
Vsevolod Stakhov [Mon, 20 Oct 2025 13:45:32 +0000 (14:45 +0100)] 
[Test] Disable milter mode in proxy worker for integration tests

Remove 'milter = yes' from proxy worker configuration to enable
HTTP protocol testing. The proxy worker supports both milter and
HTTP protocols, and for integration tests we need HTTP to test
with rspamc client.

Also enable proxy test by default now that it works correctly.

2 weeks ago[Test] Fix proxy test file access permission issues
Vsevolod Stakhov [Mon, 20 Oct 2025 13:06:18 +0000 (14:06 +0100)] 
[Test] Fix proxy test file access permission issues

Use xargs to read file list instead of passing directory path directly.
This avoids permission denied errors when rspamc runs inside Docker
container and tries to read files from mounted volumes with different
user permissions.

The controller test already uses this approach successfully.

2 weeks ago[Test] Add detailed error output for integration test failures
Vsevolod Stakhov [Mon, 20 Oct 2025 12:45:10 +0000 (13:45 +0100)] 
[Test] Add detailed error output for integration test failures

When rspamc commands fail, now show:
- Exit code
- Full stderr output saved to error log files
- Partial results if available
- Sample scan result for debugging

This makes it much easier to diagnose test failures instead of
just seeing 'exit code 1' with no context.

2 weeks ago[Test] Set ASAN_OPTIONS explicitly for proxy test
Vsevolod Stakhov [Mon, 20 Oct 2025 11:26:31 +0000 (12:26 +0100)] 
[Test] Set ASAN_OPTIONS explicitly for proxy test

Ensure ASAN_OPTIONS=detect_leaks=0 is set when running rspamc
in proxy test to avoid false positive leak detection, similar
to the fix in commit 8737a72.

2 weeks agoMerge pull request #5692 from moisseev/master
Vsevolod Stakhov [Mon, 20 Oct 2025 11:23:09 +0000 (12:23 +0100)] 
Merge pull request #5692 from moisseev/master

[Minor] Tidy utils/fuzzy_redis_migrate.pl

2 weeks ago[Minor] Tidy utils/fuzzy_redis_migrate.pl 5692/head
Alexander Moisseev [Mon, 20 Oct 2025 11:19:41 +0000 (14:19 +0300)] 
[Minor] Tidy utils/fuzzy_redis_migrate.pl

2 weeks ago[Minor] Run perltidy
Vsevolod Stakhov [Mon, 20 Oct 2025 10:40:07 +0000 (11:40 +0100)] 
[Minor] Run perltidy

2 weeks ago[Minor] Fix perlcritic warning in fuzzy_redis_migrate.pl
Vsevolod Stakhov [Mon, 20 Oct 2025 10:36:47 +0000 (11:36 +0100)] 
[Minor] Fix perlcritic warning in fuzzy_redis_migrate.pl

Replace 'return undef' with 'return' to comply with PBP guidelines.

2 weeks ago[Feature] Add fuzzy Redis migration utility
Vsevolod Stakhov [Mon, 20 Oct 2025 10:33:35 +0000 (11:33 +0100)] 
[Feature] Add fuzzy Redis migration utility

This utility provides an optimized tool for migrating Rspamd fuzzy backend
data between Redis instances with the following features:

* Non-blocking SCAN-based iteration through Redis keys
* Filter exports by specific fuzzy flags (e.g., flag 1, 8, 11)
* Automatic detection and migration of shingles (32 per text hash)
* TTL preservation for all keys
* Binary Storable format for efficient serialization
* Single-pass algorithm with O(N) complexity instead of O(N*M)
* Redis pipelining for minimal network round-trips
* Configurable batch sizes for memory and performance tuning
* Detailed statistics including per-flag distribution
* Comprehensive POD documentation

Performance optimizations:
- Large SCAN batches (default 5000) for fast key iteration
- Pipeline size of 500 operations for maximum throughput
- ~800x faster than naive approach for large datasets
- Single-pass shingle matching instead of per-hash SCAN operations

Usage:
  # Export fuzzy hashes with flag filtering
  fuzzy_redis_migrate.pl --source-host redis1 --flags 1 8 --export backup.dat

  # Import to another Redis instance
  fuzzy_redis_migrate.pl --dest-host redis2 --import backup.dat

  # View full documentation
  perldoc utils/fuzzy_redis_migrate.pl

2 weeks ago[Test] Fix integration test environment variable passing
Vsevolod Stakhov [Mon, 20 Oct 2025 07:45:42 +0000 (08:45 +0100)] 
[Test] Fix integration test environment variable passing

Pass environment variables explicitly when executing the test
script inside the Docker container using docker compose exec -e.
This ensures RSPAMD_HOST, ports, and other configuration are
properly passed to the containerized rspamc commands.

Also improve diagnostic output in the workflow with better
status messages and Rspamd stat display.

2 weeks ago[Test] Remove ps command from integration test workflow
Vsevolod Stakhov [Sat, 18 Oct 2025 16:12:17 +0000 (17:12 +0100)] 
[Test] Remove ps command from integration test workflow

The ps utility is not available in the minimal Docker container
and is not essential for the integration tests. Remove this
diagnostic step to avoid unnecessary error messages.

2 weeks ago[Test] Fix integer expression errors in ASAN log checker
Vsevolod Stakhov [Sat, 18 Oct 2025 14:32:31 +0000 (15:32 +0100)] 
[Test] Fix integer expression errors in ASAN log checker

Replace grep -c with wc -l to avoid malformed output when grep
returns results with filenames or multiple lines. The grep -c
command was producing output like "0\n0" instead of a single
integer, causing bash comparison failures.

Use wc -l with tr to ensure clean integer values, and add
error suppression to comparison operators for robustness.