Subversion Repositories configs

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4 - 1
 
2
##########################################################################
3
# $Id: spamassassin,v 0.1 2005/08/16 Andrew Hill Exp $
4
##########################################################################
5
# $Log: spamassassin,v $
6
 
7
my $Detail = $ENV{'LOGWATCH_DETAIL_LEVEL'} || 0;
8
my $Debug = $ENV{'LOGWATCH_DEBUG'} || 0;
9
 
10
$Spam			= 0;
11
$Clean			= 0;
12
 
13
while (defined($ThisLine = <STDIN>)) {
14
   if (
15
      ( $ThisLine =~ m/^Still running as root:/ ) or
16
      ( $ThisLine =~ m/^server killed/ ) or
17
      ( $ThisLine =~ m/^server started/ ) or
18
      ( $ThisLine =~ m/^server successfully spawned/ )
19
   ) {
20
      # We don't care about these
21
 
22
   } elsif ( (undef) = ($ThisLine =~ m/^identified spam/) ) {
23
      $Spam++;
24
 
25
   } elsif ( (undef) = ($ThisLine =~ m/^clean message/) ) {
26
      $Clean++;
27
}
28
}
29
##################################################################
30
 
31
if ($Spam > 0) {
32
   $Processed = $Spam + $Clean;
33
   $Percent = sprintf ("%.2f", (($Spam/$Processed) * 100));
34
   print "\n$Spam messages marked as spam";
35
   print "\n$Clean messages marked clean";
36
   print "\n$Processed total messages processed";
37
   print "\n$Percent percent of mail was spam";
38
}
39
 
40
 
41
#if ($#OtherList >= 0) {
42
#   print "\n\n**Unmatched Entries**\n\n";
43
#   print @OtherList;
44
#}
45
 
46
exit(0);
47
 
48
# vi: shiftwidth=3 tabstop=3 syntax=perl et