2018-07-28 16:13:30 +02:00
|
|
|
.\" Automatically generated by Pandoc 2.2.2.1
|
2017-05-13 17:20:00 +02:00
|
|
|
.\"
|
2014-10-15 15:14:07 +02:00
|
|
|
.TH "RSPAMC" "1" "" "Rspamd User Manual" ""
|
2017-05-13 17:20:00 +02:00
|
|
|
.hy
|
2013-12-27 19:04:56 +01:00
|
|
|
.SH NAME
|
|
|
|
.PP
|
2015-09-28 17:45:01 +02:00
|
|
|
\f[C]rspamc\f[] \- rspamd command line client
|
2013-12-27 19:04:56 +01:00
|
|
|
.SH SYNOPSIS
|
|
|
|
.PP
|
2018-07-28 16:13:30 +02:00
|
|
|
rspamc [\f[I]options\f[]] [\f[I]command\f[]] [\f[I]input\-file\f[]]\&...
|
2013-12-27 19:04:56 +01:00
|
|
|
.PP
|
2018-07-28 16:13:30 +02:00
|
|
|
rspamc \[en]help
|
2013-12-27 19:04:56 +01:00
|
|
|
.SH DESCRIPTION
|
|
|
|
.PP
|
2018-07-28 16:13:30 +02:00
|
|
|
\f[C]rspamc\f[] is a simple rspamd client, primarily for classifying or
|
|
|
|
learning messages.
|
2015-09-28 17:45:01 +02:00
|
|
|
\f[C]rspamc\f[] supports the following commands:
|
2013-12-27 19:04:56 +01:00
|
|
|
.IP \[bu] 2
|
|
|
|
Scan commands:
|
|
|
|
.RS 2
|
|
|
|
.IP \[bu] 2
|
2015-09-28 17:45:01 +02:00
|
|
|
\f[C]symbols\f[]: scan message and show symbols (default command)
|
2013-12-27 19:04:56 +01:00
|
|
|
.RE
|
|
|
|
.IP \[bu] 2
|
|
|
|
Control commands
|
|
|
|
.RS 2
|
|
|
|
.IP \[bu] 2
|
2015-09-28 17:45:01 +02:00
|
|
|
\f[C]learn_spam\f[]: learn message as spam
|
2013-12-27 19:04:56 +01:00
|
|
|
.IP \[bu] 2
|
2015-09-28 17:45:01 +02:00
|
|
|
\f[C]learn_ham\f[]: learn message as ham
|
2013-12-27 19:04:56 +01:00
|
|
|
.IP \[bu] 2
|
2015-09-28 17:45:01 +02:00
|
|
|
\f[C]fuzzy_add\f[]: add message to fuzzy storage (check \f[C]\-f\f[] and
|
2014-10-15 15:14:07 +02:00
|
|
|
\f[C]\-w\f[] options for this command)
|
2013-12-27 19:04:56 +01:00
|
|
|
.IP \[bu] 2
|
2015-09-28 17:45:01 +02:00
|
|
|
\f[C]fuzzy_del\f[]: delete message from fuzzy storage (check
|
2014-10-15 15:14:07 +02:00
|
|
|
\f[C]\-f\f[] option for this command)
|
2013-12-27 19:04:56 +01:00
|
|
|
.IP \[bu] 2
|
2015-09-28 17:45:01 +02:00
|
|
|
\f[C]stat\f[]: show rspamd statistics
|
2013-12-27 19:04:56 +01:00
|
|
|
.IP \[bu] 2
|
2015-09-28 17:45:01 +02:00
|
|
|
\f[C]stat_reset\f[]: show and reset rspamd statistics (useful for
|
2013-12-27 19:04:56 +01:00
|
|
|
graphs)
|
|
|
|
.IP \[bu] 2
|
2015-09-28 17:45:01 +02:00
|
|
|
\f[C]counters\f[]: display rspamd symbols statistics
|
2013-12-27 19:04:56 +01:00
|
|
|
.IP \[bu] 2
|
2015-09-28 17:45:01 +02:00
|
|
|
\f[C]uptime\f[]: show rspamd uptime
|
2013-12-27 19:04:56 +01:00
|
|
|
.IP \[bu] 2
|
2015-09-28 17:45:01 +02:00
|
|
|
\f[C]add_symbol\f[]: add or modify symbol settings in rspamd
|
2013-12-27 19:04:56 +01:00
|
|
|
.IP \[bu] 2
|
2015-09-28 17:45:01 +02:00
|
|
|
\f[C]add_action\f[]: add or modify action settings
|
2013-12-27 19:04:56 +01:00
|
|
|
.RE
|
|
|
|
.PP
|
2018-07-28 16:13:30 +02:00
|
|
|
Control commands that modify rspamd state are considered privileged and
|
|
|
|
require a password to be specified with the \f[C]\-P\f[] option (see
|
|
|
|
\f[B]OPTIONS\f[], below, for details).
|
|
|
|
.PD 0
|
|
|
|
.P
|
|
|
|
.PD
|
|
|
|
This depends on a controller's settings and is discussed in the
|
|
|
|
\f[C]rspamd\-workers\f[] page (see \f[B]SEE ALSO\f[], below, for
|
|
|
|
details).
|
2013-12-27 19:04:56 +01:00
|
|
|
.PP
|
|
|
|
\f[C]Input\ files\f[] may be either regular file(s) or a directory to
|
|
|
|
scan.
|
2015-09-28 17:45:01 +02:00
|
|
|
If no files are specified \f[C]rspamc\f[] reads from the standard input.
|
2018-07-28 16:13:30 +02:00
|
|
|
Controller commands usually do not accept any input, however learn* and
|
|
|
|
fuzzy* commands requires input.
|
2013-12-27 19:04:56 +01:00
|
|
|
.SH OPTIONS
|
|
|
|
.TP
|
2014-10-15 15:14:07 +02:00
|
|
|
.B \-h \f[I]host[:port]\f[], \-\-connect=\f[I]host[:port]\f[]
|
|
|
|
Specify host and port
|
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
|
|
|
.B \-P \f[I]password\f[], \-\-password=\f[I]password\f[]
|
|
|
|
Specify control password
|
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
|
|
|
.B \-c \f[I]name\f[], \-\-classifier=\f[I]name\f[]
|
2013-12-27 19:04:56 +01:00
|
|
|
Classifier to learn spam or ham (bayes is used by default)
|
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
2014-10-15 15:14:07 +02:00
|
|
|
.B \-w \f[I]weight\f[], \-\-weight=\f[I]weight\f[]
|
2013-12-27 19:04:56 +01:00
|
|
|
Weight for fuzzy operations
|
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
2014-10-15 15:14:07 +02:00
|
|
|
.B \-f \f[I]number\f[], \-\-flag=\f[I]number\f[]
|
2013-12-27 19:04:56 +01:00
|
|
|
Flag for fuzzy operations
|
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
2014-10-15 15:14:07 +02:00
|
|
|
.B \-p, \-\-pass
|
2013-12-27 19:04:56 +01:00
|
|
|
Pass all filters
|
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
2014-10-15 15:14:07 +02:00
|
|
|
.B \-v, \-\-verbose
|
2013-12-27 19:04:56 +01:00
|
|
|
More verbose output
|
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
2014-10-15 15:14:07 +02:00
|
|
|
.B \-i \f[I]ip address\f[], \-\-ip=\f[I]ip address\f[]
|
2013-12-27 19:04:56 +01:00
|
|
|
Emulate that message was received from specified ip address
|
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
2014-10-15 15:14:07 +02:00
|
|
|
.B \-u \f[I]username\f[], \-\-user=\f[I]username\f[]
|
2016-06-12 15:05:27 +02:00
|
|
|
Emulate that message was received from specified authenticated user
|
2013-12-27 19:04:56 +01:00
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
2014-10-15 15:14:07 +02:00
|
|
|
.B \-d \f[I]user\@domain\f[], \-\-deliver=\f[I]user\@domain\f[]
|
2018-07-28 16:13:30 +02:00
|
|
|
Emulate that message was delivered to specified user (for
|
|
|
|
LDA/statistics)
|
2013-12-27 19:04:56 +01:00
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
2014-10-15 15:14:07 +02:00
|
|
|
.B \-F \f[I]user\@domain\f[], \-\-from=\f[I]user\@domain\f[]
|
2016-06-12 15:05:27 +02:00
|
|
|
Emulate that message has specified SMTP FROM address
|
2013-12-27 19:04:56 +01:00
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
2014-10-15 15:14:07 +02:00
|
|
|
.B \-r \f[I]user\@domain\f[], \-\-rcpt=\f[I]user\@domain\f[]
|
2016-06-12 15:05:27 +02:00
|
|
|
Emulate that message has specified SMTP RCPT address
|
2013-12-27 19:04:56 +01:00
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
2014-10-15 15:14:07 +02:00
|
|
|
.B \-\-helo=\f[I]helo_string\f[]
|
2014-01-06 17:31:27 +01:00
|
|
|
Imitate SMTP HELO passing from MTA
|
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
2014-10-15 15:14:07 +02:00
|
|
|
.B \-\-hostname=\f[I]hostname\f[]
|
2014-01-06 17:31:27 +01:00
|
|
|
Imitate hostname passing from MTA (rspamd assumes that it is verified by
|
|
|
|
MTA)
|
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
2014-10-15 15:14:07 +02:00
|
|
|
.B \-t \f[I]seconds\f[], \-\-timeout=\f[I]seconds\f[]
|
2018-07-28 16:13:30 +02:00
|
|
|
Timeout for waiting for a reply (can be floating point number,
|
|
|
|
e.g.\ 0.1)
|
2013-12-27 19:04:56 +01:00
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
2014-10-15 15:14:07 +02:00
|
|
|
.B \-b \f[I]host:port\f[], \-\-bind=\f[I]host:port\f[]
|
2013-12-27 19:04:56 +01:00
|
|
|
Bind to specified ip address
|
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
2014-10-15 15:14:07 +02:00
|
|
|
.B \-j, \-\-json
|
|
|
|
Output formatted JSON
|
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
|
|
|
.B \-\-ucl
|
|
|
|
Output UCL
|
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
|
|
|
.B \-\-raw
|
|
|
|
Output raw data received from rspamd (compacted JSON)
|
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
|
|
|
.B \-\-headers
|
|
|
|
Output HTTP headers from a reply
|
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
2014-11-25 19:37:32 +01:00
|
|
|
.B \-\-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).
|
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
2015-09-06 22:56:38 +02:00
|
|
|
.B \-n \f[I]parallel_count\f[], \-\-max\-requests=\f[I]parallel_count\f[]
|
2014-10-15 16:29:28 +02:00
|
|
|
Maximum number of requests to rspamd executed in parallel (8 by default)
|
2014-10-15 15:14:07 +02:00
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
2015-09-06 22:56:38 +02:00
|
|
|
.B \-e \f[I]command\f[], \-\-execute=\f[I]command\f[]
|
|
|
|
Execute the specified command with either mime output (if \f[C]mime\f[]
|
|
|
|
option is also specified) or formatted rspamd output
|
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
|
|
|
.B \-\-mime
|
|
|
|
Output the full mime message instead of scanning results only
|
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
2015-10-19 19:44:30 +02:00
|
|
|
.B \-\-header=\f[I]header\f[]
|
|
|
|
Add custom HTTP header for a request.
|
|
|
|
You may specify header in format \f[C]name=value\f[] or just
|
|
|
|
\f[C]name\f[] for an empty header.
|
|
|
|
This option can be repeated multiple times.
|
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
2015-10-19 20:07:00 +02:00
|
|
|
.B \-\-sort=\f[I]type\f[]
|
|
|
|
Sort output according to a specific field.
|
|
|
|
For \f[C]counters\f[] command the allowed values for this key are
|
2018-07-28 16:13:30 +02:00
|
|
|
\f[C]name\f[], \f[C]weight\f[], \f[C]frequency\f[] and \f[C]hits\f[].
|
2015-10-19 20:07:00 +02:00
|
|
|
Appending \f[C]:desc\f[] to any of these types inverts sorting order.
|
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.TP
|
2014-10-15 15:14:07 +02:00
|
|
|
.B \-\-commands
|
2013-12-27 19:04:56 +01:00
|
|
|
List available commands
|
|
|
|
.RS
|
|
|
|
.RE
|
|
|
|
.SH RETURN VALUE
|
|
|
|
.PP
|
2017-05-13 17:20:00 +02:00
|
|
|
On exit \f[C]rspamc\f[] returns \f[C]0\f[] if operation was successful
|
2015-09-28 17:45:01 +02:00
|
|
|
and an error code otherwise.
|
2013-12-27 19:04:56 +01:00
|
|
|
.SH EXAMPLES
|
2011-02-07 16:53:55 +01:00
|
|
|
.PP
|
|
|
|
Check stdin:
|
2013-12-27 19:04:56 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
rspamc\ <\ some_file
|
|
|
|
\f[]
|
|
|
|
.fi
|
2011-02-07 16:53:55 +01:00
|
|
|
.PP
|
|
|
|
Check files:
|
2013-12-27 19:04:56 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
rspamc\ symbols\ file1\ file2\ file3
|
|
|
|
\f[]
|
|
|
|
.fi
|
2011-02-07 16:53:55 +01:00
|
|
|
.PP
|
|
|
|
Learn files:
|
2013-12-27 19:04:56 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2014-10-15 15:14:07 +02:00
|
|
|
rspamc\ \-P\ pass\ learn_spam\ file1\ file2\ file3
|
2013-12-27 19:04:56 +01:00
|
|
|
\f[]
|
|
|
|
.fi
|
2011-02-07 16:53:55 +01:00
|
|
|
.PP
|
|
|
|
Add fuzzy hash to set 2:
|
2013-12-27 19:04:56 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2014-10-15 15:14:07 +02:00
|
|
|
rspamc\ \-P\ pass\ \-f\ 2\ \-w\ 10\ fuzzy_add\ file1\ file2
|
2013-12-27 19:04:56 +01:00
|
|
|
\f[]
|
|
|
|
.fi
|
2011-02-07 16:53:55 +01:00
|
|
|
.PP
|
|
|
|
Delete fuzzy hash from other server:
|
2013-12-27 19:04:56 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
2014-10-15 15:14:07 +02:00
|
|
|
rspamc\ \-P\ pass\ \-h\ hostname:11334\ \-f\ 2\ fuzzy_del\ file1\ file2
|
2013-12-27 19:04:56 +01:00
|
|
|
\f[]
|
|
|
|
.fi
|
2011-02-07 16:53:55 +01:00
|
|
|
.PP
|
|
|
|
Get statistics:
|
2013-12-27 19:04:56 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
rspamc\ stat
|
|
|
|
\f[]
|
|
|
|
.fi
|
2011-03-15 14:32:58 +01:00
|
|
|
.PP
|
|
|
|
Get uptime:
|
2013-12-27 19:04:56 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
rspamc\ uptime
|
|
|
|
\f[]
|
|
|
|
.fi
|
2011-03-15 14:32:58 +01:00
|
|
|
.PP
|
2018-07-28 16:13:30 +02:00
|
|
|
Add custom rule's weight:
|
2013-12-27 19:04:56 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
rspamc\ add_symbol\ test\ 1.5
|
|
|
|
\f[]
|
|
|
|
.fi
|
2012-10-02 18:32:49 +02:00
|
|
|
.PP
|
2018-07-28 16:13:30 +02:00
|
|
|
Add custom action's weight:
|
2013-12-27 19:04:56 +01:00
|
|
|
.IP
|
|
|
|
.nf
|
|
|
|
\f[C]
|
|
|
|
rspamc\ add_action\ reject\ 7.1
|
|
|
|
\f[]
|
|
|
|
.fi
|
|
|
|
.SH SEE ALSO
|
2011-02-07 16:53:55 +01:00
|
|
|
.PP
|
2018-07-28 16:13:30 +02:00
|
|
|
Rspamd documentation and source code may be downloaded from
|
2013-12-27 19:04:56 +01:00
|
|
|
<https://rspamd.com/>.
|