% RSPAMC(1) Rspamd User Manual
# NAME
rspamc - rspamd command line client
# SYNOPSIS
rspamc [*options*] [*command*] [*input-file*]...
rspamc --help
# DESCRIPTION
Rspamc is a simple client for checking messages using rspamd or for learning rspamd by messages.
Rspamc supports the following commands:
* Scan commands:
* *symbols*: scan message and show symbols (default command)
* Control commands
* *learn_spam*: learn message as spam
* *learn_ham*: learn message as ham
* *fuzzy_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 statistics
* *stat_reset*: show and reset rspamd statistics (useful for graphs)
* *counters*: display rspamd symbols statistics
* *uptime*: show rspamd uptime
* *add_symbol*: add or modify symbol settings in rspamd
* *add_action*: add or modify action settings
Control 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.
# OPTIONS
-h *host[:port]*, \--connect=*host[:port]*
: Specify host and port
-P *password*, \--password=*password*
: Specify control password
-c *name*, \--classifier=*name*
: Classifier to learn spam or ham (bayes is used by default)
-w *weight*, \--weight=*weight*
: Weight for fuzzy operations
-f *number*, \--flag=*number*
: Flag for fuzzy operations
-p, \--pass
: Pass all filters
-v, \--verbose
: More verbose output
-i *ip address*, \--ip=*ip address*
: Emulate that message was received from specified ip address
-u *username*, \--user=*username*
: Emulate that message was from specified user
-d *user@domain*, \--deliver=*user@domain*
: Emulate that message is delivered to specified user
-F *user@domain*, \--from=*user@domain*
: Emulate that message is from specified user
-r *user@domain*, \--rcpt=*user@domain*
: Emulate that message is for specified user
\--helo=*helo_string*
: Imitate SMTP HELO passing from MTA
\--hostname=*hostname*
: Imitate hostname passing from MTA (rspamd assumes that it is verified by MTA)
-t *seconds*, \--timeout=*seconds*
: Timeout for waiting for a reply (can be floating point number, e.g. 0.1)
-b *host:port*, \--bind=*host:port*
: Bind to specified ip address
-j, \--json
: Output formatted JSON
\--ucl
: Output UCL
\--raw
: Output raw data received from rspamd (compacted JSON)
\--headers
: Output HTTP headers from a reply
\--extended-urls
: Output URLs in an extended format, showing full URL, host and the part of host that was used by surbl module (if enabled).
-n *parallel_count*, \--max-requests=*parallel_count*
: Maximum number of requests to rspamd executed in parallel (8 by default)
\--commands
: List available commands
# RETURN VALUE
On exit rspamc returns `0` if operation was successfull and an error code otherwise.
# EXAMPLES
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
# SEE ALSO
Rspamd documentation and source codes may be downloaded from
.
[rspamd-workers]: https://rspamd.com/doc/workers/,TlN4;0ˍV(ՙqVlmMblr]I# V\k_?}UqY0D2,*h2sհ\gv7z|ۊe[l'ff L\NʮK_9=>v[Pfn':YT&yو?Nc~[ϦӶNE0;UεJ[Z1jv(;ݚ=t&WtN]G7c}9ݟw0j `Ynws7RBr)탖Fkudb8BcS/Ge:t@t̞ZՖ
INeO6H/rq~YK>Q`Y*3ngw~w[D[ⁱK!ƥR1y)8)>4Zm4V?9"t'hL0JvE:li5nZ;?el\(-o=3:6aa>NDZfV,tڏjN-IeRo{?;dgJD騹V7ĝGdtΨLb^&V[8DJW'GF9!YPZNh
XjԄm TV8dnbS;`?طsmڸ2אsy{8gUf('mi;\ʃ[mAHO\ԮۛLANb5mn38J}_\JG'Mj$lϬ0~(N)Ͻ8\\Kb;Zܑvd:>O6r>}}R [\BF=8՜#˳bMq.sz"䶹 sk Jl#mjU
vYSKB]S~CĞ\>;TrtV=?#7Ym咗σٝזu.r26Ojz{kYgcVz5?Eǖ|"7
ڻlpzF7ͦX{>/%M}bL/ZiIzUNY<Њb+]W8gƥd}./V֛VcWRnY紙O;M8HK[~"JhP/ %QR4b聵ּ;H͝EĂh/v,5Ev
GO.(lR,T>gy̖Ð]١(P qoꎼfX'ܕ.8TK7_ &TGM4Y̶kbYޱ\x.{=5ocD:j2i!(*[&_ h8AauUuEP-:4}Q O8|h+5iBrG^S8t[M[O`T[~R>ӮQ4`LX%DBOX nq"RE\<r{\dd\S 7O
`BZ+B i?c3NP{k d@.E
(WCxK>םẛU!MAX&xlwe'|F,Vh SDӄD(!vJDV4Au)@YMYU)8:K"'_ mɿȎIޓ.7
/Q3}D>$SKak' -y*