$linuxjunkies
>

rspamd(8)

rspamd is a fast and modular spam filtering system that uses machine learning and rule-based detection to classify emails.

UbuntuDebianFedoraArch

Synopsis

rspamd [OPTION]... [CONFIG_FILE]

Description

rspamd is a high-performance spam filtering daemon written in C that uses Bayesian classification, fuzzy matching, and complex rule systems to detect spam and phishing emails. It integrates with mail servers via the RSPAMD protocol and provides real-time analysis with minimal latency.

The daemon loads configuration from /etc/rspamd/ and maintains learning databases for Bayesian spam/ham classification. It supports multiple backends (Redis, SQLite) for storing learned data and can be controlled via rspamdctl or HTTP API.

Common options

FlagWhat it does
-h, --helpdisplay help message and exit
-v, --versionshow version information
-c, --config=FILEload configuration from FILE instead of default
-d, --daemonizerun as a background daemon
-u, --user=USERrun daemon as specified user (default: _rspamd)
-g, --group=GROUPrun daemon with specified group (default: _rspamd)
-p, --pidfile=FILEwrite process ID to FILE
-f, --foregroundrun in foreground (don't daemonize)
--compressenable compression in protocol
-t, --test-configtest configuration and exit without running

Examples

Start rspamd daemon in background with custom config file

rspamd -d -c /etc/rspamd/rspamd.conf

Validate the configuration syntax without starting the daemon

rspamd -t -c /etc/rspamd/rspamd.conf

Feed an email to rspamd for spam learning

rspamdctl learn_spam < spam_email.eml

Display current rspamd statistics and performance metrics

rspamdctl stat

Run rspamd in foreground as rspamd user and group (useful for debugging)

rspamd -f -u rspamd -g rspamd

Manually submit an email to rspamd HTTP API for scanning

curl -X POST --data-binary @email.eml http://localhost:11333/check

Restart rspamd service and watch the log output

systemctl restart rspamd && tail -f /var/log/rspamd/rspamd.log

Show statistics about fuzzy hashes used for spam detection

rspamdctl fuzzy_stat

Related commands