Rapid spam filtering system.
  • C 50.6%
  • C++ 27.6%
  • Lua 16.1%
  • RobotFramework 1.3%
  • CMake 1.2%
  • Other 3.1%
Find a file
Vsevolod Stakhov dcc064ded1
[Fix] neural: retarget training vectors to best-known profile
Workers kept writing training data to the last-loaded ANN's redis key
(set.ann.redis_key) even when a newer, more specific profile was
already registered in the ZLIST.  If that new profile had no ANN data
yet (e.g. controller created a placeholder after a symbols change),
load_new_ann silently left set.ann untouched, so vectors kept piling
up under the old key while the controller waited for the new key's
spam/ham sets to fill — a deadlock visible as repeated "more specific
ann is available" log lines without any retrain ever happening.

Track the best-known profile in set.training_profile, updated on every
process_existing_ann tick whenever sel_elt is picked.  ann_push_task_result
now routes target_key and the vectors_len script call through
(set.training_profile or set.ann).redis_key, so training data lands on
the newest profile immediately.  set.ann is left alone so inference
keeps using the previously loaded ANN until a fresh one is trained.
2026-04-20 22:02:54 +01:00
.claude [Minor] Some more instructions for Claude Code 2025-12-02 13:24:53 +00:00
.cursor/rules Merge branch 'master' into vstakhov-aliases-rewamp 2025-10-06 12:56:30 +01:00
.github [Project] Disable all npm dependency updates including security fixes 2026-03-26 08:55:56 +03:00
clang-plugin [Fix] clang-plugin: add null check for struct type in check_struct_type 2026-02-05 14:04:57 +00:00
cmake [Fix] Fix build with ENABLE_HYPERSCAN=OFF 2026-03-15 11:48:13 +00:00
conf Merge pull request #5977 from moisseev/graylist 2026-04-19 10:10:33 +01:00
contrib [Fix] Port security fixes from libucl upstream 2026-04-13 09:22:01 +01:00
debian Revert "Use PUC-Rio Lua in packages" 2025-12-30 09:47:39 +00:00
doc Modify rspamc doc to clarify that control password can also be passed by path 2025-05-16 22:26:03 +02:00
docker [Minor] Replace Dockerfile with advertisement for image 2023-11-30 22:24:47 +02:00
freebsd [Fix] remove obsolete rspamd-redirector files 2023-03-05 10:55:03 +00:00
interface Merge pull request #5900 from moisseev/classifiers 2026-02-23 09:25:51 +00:00
local.d [Feature] Add URL deep processing architecture 2025-11-14 12:27:21 +00:00
lualib [Feature] Add --batch-wait option to dmarc_report (#5985) 2026-04-18 09:09:43 +01:00
rpm [Feature] Add mapstats utility for multimap statistics analysis 2026-02-02 10:57:00 +03:00
rules [Rework] Make hard deps opt-in, weak deps default 2026-03-31 16:57:12 +01:00
src [Fix] neural: retarget training vectors to best-known profile 2026-04-20 22:02:54 +01:00
test Merge pull request #5972 from outtersg/one-by-one-lua-test 2026-04-20 20:35:22 +01:00
utils [Minor] Fix security issues and add security documentation 2026-02-02 11:43:59 +03:00
.clang-format [Rework] Use clang-format to unify formatting in all sources 2023-07-26 10:49:23 +01:00
.gitignore [Minor] Remove .factory from version control 2026-01-11 11:40:58 +00:00
.luacheckrc [Fix] Move binary msgpack data from KEYS to ARGV in Bayes Redis scripts 2026-02-24 13:38:31 +00:00
.overcommit.yml [Feature] Pluggable async hyperscan cache backend 2026-01-09 19:38:37 +00:00
.stylelintrc.json [Test] Remove deprecated Stylelint rule 2023-12-09 17:49:20 +03:00
.tidyallrc [Minor] Remove tidy checks as they are crap 2019-07-22 16:25:12 +01:00
AUTHORS.md Update AUTHORS.md 2025-03-15 15:51:20 -05:00
blas-config.h.in [Feature] Support BLIS blas library 2020-09-02 13:46:16 +01:00
ChangeLog Release 4.0.1 2026-04-05 19:56:32 +01:00
CLAUDE.md [Minor] Try to fix CC issue with tabs 2026-02-12 16:27:21 +00:00
CMakeLists.txt [Minor] Update version to 4.0.2 2026-04-05 20:32:44 +01:00
config.h.in [Feature] Replace libfasttext with mmap-based built-in shim 2026-02-21 16:43:16 +00:00
CONTRIBUTING.md [Minor] Some neats 2023-11-26 22:47:58 +00:00
dist.sh [Minor] Simplify creation of dist tarball that is reproducible 2020-01-18 16:26:39 +00:00
eslint.config.mjs [Test] Update JS linters 2025-10-09 16:55:04 +03:00
LICENSE.md [Minor] Proper license format 2018-09-22 13:10:55 +01:00
lua_style.md Spelling (#4086) 2022-02-22 22:01:28 +00:00
package-lock.json [Test] Update dev dependencies 2026-02-28 09:29:07 +03:00
package.json [Test] Update dev dependencies 2026-02-28 09:29:07 +03:00
README.md Update README links to point to new documentation site 2026-02-21 14:39:28 +01:00
rspamd.service [Minor] Require network-online target as well 2018-03-08 09:48:30 +00:00
set-version.sh [Minor] Update Debian and RPM package versions 2020-02-14 23:21:42 +00:00

Rspamd

GHA

Introduction

Rspamd is an advanced spam filtering system and email processing framework that allows evaluation of messages by a number of rules including regular expressions, statistical analysis and custom services such as URL black lists. Each message is analysed by Rspamd and given a verdict that might be used by MTA for further processing (e.g. to reject a message, or add a special header indicating spam) along with other information, such as possible DKIM signature or modifications suggested for a message.

Rspamd can act as a Milter allowing direct interaction with popular MTA systems, such as Postfix or Sendmail.

Rspamd is designed to process hundreds of messages per second simultaneously, and provides a number of useful features including a comprehensive Lua API that allows access to messages processing in various aspects as well as asynchronous network API to access external resources, such as DNS, HTTP or even generic TCP/UDP services.

Getting Started

A good starting point to study how to install and configure Rspamd is the quick start guide.

Rspamd is packaged for the major Linux distributions, and is also available via FreeBSD ports, NetBSD pkgsrc and OpenBSD ports.

We advice to use packages provided by Rspamd project if available for your OS instead of packages that might be provided by some Linux distributives, as they are usually out of date and does not provide the desired spam filtering quality nor supported by Rspamd project.

Spam filtering features

Rspamd is shipped with various spam filtering modules and features enabled just out of the box. The full list of built-in modules could be found in the Rspamd documentation.

If that is not enough, Rspamd provides an extensive Lua API to write your own rules and plugins: https://docs.rspamd.com/developers/writing_rules/

License

This project is licensed under the Apache 2.0 License - see the LICENSE.md file for details

Contributing

Please read CONTRIBUTING.md for details on the process for submitting pull requests to us.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in rspamd by you, as defined in the APACHE 2.0 license, shall be licensed as above, without any additional terms or conditions.

Authors

See also the list of contributors who participated in this project.

References