[Logwatch-Devel] sendmail script, totalling blackholes

Greg Matthews gmatt at nerc.ac.uk
Wed Dec 7 04:17:16 MST 2005


I brought this up just before the release of 7.

when using detail=3 the tally of messages blocked by RBLs is never done
which doesnt match similar tallies. The total is only calculated if
detail>=10.

I think the attached change makes it more in line with other tallies

G


-- 
Greg Matthews           01491 692445
Head of UNIX/Linux, iTSS Wallingford
-------------- next part --------------
# Other errors not originating in base (stock) sendmail distribution

if (keys %BlackHoled) {
   eval "$PrintCond" if ($Detail >= 3);
   print "\n\nBlackHole Totals:" if ($Detail >= 3);
   foreach $ThisOne (sort keys %BlackHoles) {
      print "\n    $ThisOne: $BlackHoles{$ThisOne} Time(s)" if ($Detail >= 5);
      # moved tally to here GWM 7/12/05
      $TotalError[$ErrorIndex] += $BlackHoles{$ThisOne};
   }
   if ($Detail >= 10) {
      print "\nBlackholed:";
      my $BlackHoleThreshold = $ENV{'sendmail_blackholethreshold'} || "1";
      foreach $ThisOne (sort keys %BlackHoled) {
         if ($BlackHoled{$ThisOne} >= $BlackHoleThreshold) {
            print "\n    $ThisOne: $BlackHoled{$ThisOne} Times(s)";
         }
# moved tally GWM 7/12/05
#         $TotalError[$ErrorIndex] += $BlackHoled{$ThisOne};
      }
   }
   print "\n\tTotal:  $TotalError[$ErrorIndex]" if ($Detail >= 3);
}
$TotalError[++$ErrorIndex] = 0;



More information about the Logwatch-Devel mailing list