Subversion Repositories configs

Rev

Blame | Last modification | View Log | RSS feed


##########################################################################
# $Id: spamassassin,v 0.1 2005/08/16 Andrew Hill Exp $
##########################################################################
# $Log: spamassassin,v $

my $Detail = $ENV{'LOGWATCH_DETAIL_LEVEL'} || 0;
my $Debug = $ENV{'LOGWATCH_DEBUG'} || 0;

$Spam                   = 0;
$Clean                  = 0;

while (defined($ThisLine = <STDIN>)) {
   if ( 
      ( $ThisLine =~ m/^Still running as root:/ ) or 
      ( $ThisLine =~ m/^server killed/ ) or 
      ( $ThisLine =~ m/^server started/ ) or 
      ( $ThisLine =~ m/^server successfully spawned/ ) 
   ) {
      # We don't care about these
  
   } elsif ( (undef) = ($ThisLine =~ m/^identified spam/) ) {
      $Spam++;

   } elsif ( (undef) = ($ThisLine =~ m/^clean message/) ) {
      $Clean++;
}
}
##################################################################

if ($Spam > 0) {
   $Processed = $Spam + $Clean;
   $Percent = sprintf ("%.2f", (($Spam/$Processed) * 100));
   print "\n$Spam messages marked as spam";
   print "\n$Clean messages marked clean";
   print "\n$Processed total messages processed";
   print "\n$Percent percent of mail was spam";
}


#if ($#OtherList >= 0) {
#   print "\n\n**Unmatched Entries**\n\n";
#   print @OtherList;
#}
        
exit(0);

# vi: shiftwidth=3 tabstop=3 syntax=perl et