Debian Codegraph @

bin/razor-check

raw
1 #!/usr/bin/perl -w
2 ##
3 ## I do the following.
4 ##
5 ## razor-check - check spam message against a Razor Catalogue Server.
6 ##
7 ## Copyright (c) 1998, Vipul Ved Prakash. All rights reserved.
8 ## This code is free software; you can redistribute it and/or modify
9 ## it under the same terms as Perl itself.
10 ##
11 ## $Id: razor-check,v 1.1 2005/06/16 19:45:54 rsoderberg Exp $
12
13 use lib qw(lib);
14 use strict;
15 use Razor2::Client::Agent;
16
17
18 my $agent = new Razor2::Client::Agent('razor-check')
19 or die $Razor2::Client::Agent::errstr;
20 $agent->read_options()
21 or die $agent->errstr ."\n";
22 $agent->do_conf()
23 or die $agent->errstr ."\n";
24
25 # quiet warning
26 my $dummy = $Razor2::Client::Agent::errstr;
27
28 #
29 # doit() will not exit
30 #
31 my $response = $agent->doit();
32
33 if ($response > 1) {
34
35 # error
36 print STDERR $agent->errstr;
37 }
38
39 exit $response;
40