=head1 NAME rspamc - a simple client for rspamd spam filtering system =head1 SYNOPSIS rspamc [B<-h> I] [B<-p>] [B<-v>] [B<-b> I] [B<-u> I] [B<-F> I] [B<-r> I] [B<-d> I] [B<-i> I] [B<-c> I] [B<-w> I] [B<-P> I] [B<-f> I] [B<-t> I] [command] [file [file ...]] rspamc [B<--help>] =head1 DESCRIPTION B is a simple client for checking messages using rspamd or for learning rspamd by messages. B has several mandatory options for learning: I and I. =head1 OPTIONS =over 4 =item B<-h> I, B<--connect> I Specify host and port for connecting to rspamd server. Default host is I 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 B<-h> /path/to/soket) =item B<-b> I, B<--bind> I Specify explicit IP address to bind a client for operations. =item B<-u> I, B<--user> I Specify username for connection with rspamd server. =item B<-F> I, B<--from> I Specify SMTP FROM address for connection with rspamd server. =item B<-r> I, B<--rcpt> I Specify SMTP RCPT TO address for connection with rspamd server. =item B<-d> I, B<--deliver> I 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, B<--password> I Specify controller's password. Mandatory option for learning. =item B<-c> I, B<--classifier> I Specify classifier to learn message. Mandatory option for learning. Bayes classifier is used by default if this option is omitted. =item B<-i> I, B<--ip> I Add IP header when scanning message. Useful for checking messages and emulating that client comes from specific IP address. =item B<-w> I, B<--weight> I Weight of message for fuzzy operations. =item B<-f> I, B<--flag> I Flag of list for fuzzy operations. =item B<-t> I, B<--timeout> I Timeout in seconds for all operations. Default value is 5 seconds. =back =head1 RETURN VALUE On exit B 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 =head1 COPYRIGHT AND LICENSE Copyright 2011-2012 by Vsevolod Stakhov . This program is free software; you may redistribute it and/or modify it under the terms of BSD license. =cut