% RSPAMC(1) Rspamd User Manual
rspamc
- rspamd command line client
rspamc [options] [command] [input-file]…
rspamc --help
rspamc
is a simple client for checking messages using rspamd or for learning rspamd by messages.
rspamc
supports the following commands:
symbols
: scan message and show symbols (default command)learn_spam
: learn message as spamlearn_ham
: learn message as hamfuzzy_add
: add message to fuzzy storage (check -f
and -w
options for this command)fuzzy_del
: delete message from fuzzy storage (check -f
option for this command)stat
: show rspamd statisticsstat_reset
: show and reset rspamd statistics (useful for graphs)counters
: display rspamd symbols statisticsuptime
: show rspamd uptimeadd_symbol
: add or modify symbol settings in rspamdadd_action
: add or modify action settingsControl commands that modifies rspamd state are considered as privileged and basically requires a password
to be specified with -P
option (see OPTIONS, below, for details).
This depends on a controller’s settings and is discussed in rspamd-workers
page.
Input files
may be either regular file(s) or a directory to scan. If no files are specified rspamc
reads
from the standard input. Controller commands usually does not accept any input, however learn* and fuzzy* commands
requires input.
mime
option is also specified) or formatted rspamd outputname=value
or just name
for an empty header. This option can be repeated multiple times.counters
command the allowed values for this key are name
, weight
, frequency
and time
. Appending :desc
to any of these types inverts sorting order.On exit rspamc
returns 0
if operation was successfull and an error code otherwise.
Check stdin:
rspamc < some_file
Check files:
rspamc symbols file1 file2 file3
Learn files:
rspamc -P pass learn_spam file1 file2 file3
Add fuzzy hash to set 2:
rspamc -P pass -f 2 -w 10 fuzzy_add file1 file2
Delete fuzzy hash from other server:
rspamc -P pass -h hostname:11334 -f 2 fuzzy_del file1 file2
Get statistics:
rspamc stat
Get uptime:
rspamc uptime
Add custom rule’s weight:
rspamc add_symbol test 1.5
Add custom action’s weight:
rspamc add_action reject 7.1
Rspamd documentation and source codes may be downloaded from https://rspamd.com/.