aboutsummaryrefslogtreecommitdiffstats
path: root/doc/rspamc.pod
blob: 73b43b649fcf0fa0a915659cd2c6c83012ee41dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
=head1 NAME

rspamc - a simple client for rspamd spam filtering system

=head1 SYNOPSIS

rspamc [B<-h> I<host[:port]>] [B<-p>] [B<-v>] [B<-b> I<bind_address>] [B<-u> I<user>]
[B<-F> I<from>] [B<-r> I<rcpt>] [B<-d> I<deliver-to>]
[B<-i> I<ip>] [B<-c> I<classifier>] [B<-w> I<weight>]
[B<-P> I<password>] [B<-f> I<flag>] [B<-t> I<timeout>] [command] [file [file ...]] 

rspamc [B<--help>]

=head1 DESCRIPTION

B<Rspamc> is a simple client for checking messages using rspamd or for learning rspamd by messages.
B<Rspamc> has several mandatory options for learning: I<password> and I<statfile>.

=head1 OPTIONS

=over 4

=item B<-h> I<host[:port]>, B<--connect> I<host[:port]>

Specify host and port for connecting to rspamd server. Default host is I<localhost> and
default port is I<11333> for checking messages and I<11334> for learning and statistic. 
Also it is possible to specify a unix socket for all operations (for example:
B<rspamc> B<-h> /path/to/soket)

=item B<-b> I<local_ip>, B<--bind> I<local_ip>

Specify explicit IP address to bind a client for operations.

=item B<-u> I<user>, B<--user> I<user>

Specify username for connection with rspamd server.

=item B<-F> I<from_addr>, B<--from> I<from_addr>

Specify SMTP FROM address for connection with rspamd server.

=item B<-r> I<rcpt_addr>, B<--rcpt> I<rcpt_addr>

Specify SMTP RCPT TO address for connection with rspamd server.

=item B<-d> I<deliver_addr>, B<--deliver> I<deliver_addr>

Specify real delivery address for connection with rspamd server.

=item B<-p>, B<--pass-all>

Pass all filters when checking messages. Ignored in case of learning.

=item B<-v>, B<--verbose>

Be more verbose while displaying results. For example show descriptions of symbols.

=item B<-P> I<password>, B<--password> I<password>

Specify controller's password. Mandatory option for learning.

=item B<-c> I<classifier>, B<--classifier> I<classifier>

Specify classifier to learn message. Mandatory option for learning. Bayes classifier is used by default if this option is omitted.

=item B<-i> I<ip>, B<--ip> I<ip>

Add IP header when scanning message. Useful for checking messages and emulating that client comes from 
specific IP address.

=item B<-w> I<weight>, B<--weight> I<weight>

Weight of message for fuzzy operations.

=item B<-f> I<flag>, B<--flag> I<flag>

Flag of list for fuzzy operations.

=item B<-t> I<timeout>, B<--timeout> I<timeout>

Timeout in seconds for all operations. Default value is 5 seconds.

=back

=head1 RETURN VALUE

On exit B<rspamc> returns 0 if operation was successfull and error code otherwise.

=head1 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

=head1 AUTHOR

Vsevolod Stakhov <vsevolod@highsecure.ru>

=head1 COPYRIGHT AND LICENSE

Copyright 2011-2012 by Vsevolod Stakhov <vsevolod@highsecure.ru>.

This program is free software; you may redistribute it and/or modify it
under the terms of BSD license.

=cut