diff -up smeserver-mailstats-1.0/root/usr/bin/spamfilter-stats-7.pl.spamfilter smeserver-mailstats-1.0/root/usr/bin/spamfilter-stats-7.pl --- smeserver-mailstats-1.0/root/usr/bin/spamfilter-stats-7.pl.spamfilter 2013-09-23 17:15:00.000000000 -0400 +++ smeserver-mailstats-1.0/root/usr/bin/spamfilter-stats-7.pl 2013-09-23 17:26:01.000000000 -0400 @@ -61,7 +61,7 @@ if ($cdb->get('mailstats')){ #Configuration section my %opt = ( - version => '0.6.23', # please update at each change. + version => '0.6.26', # please update at each change. debug => 0, # guess what ? sendmail => '/usr/sbin/sendmail', # Path to sendmail stub from => 'spamfilter-stats', # Who is the mail from @@ -242,10 +242,12 @@ while ( $nhour < $end / 3600 ) { } $nhour++; } -# and grand totals and display status from db entries, and column widths +# and grand totals, percent and display status from db entries, and column widths $ncateg = 0; while ( $ncateg < @categs) { $counts{$GRANDTOTAL}{$categs[$ncateg]} = 0; + $counts{$PERCENT}{$categs[$ncateg]} = 0; + if ($cdb->get('mailstats')){ $display[$ncateg] = lc($cdb->get('mailstats')->prop($categs[$ncateg])) || "auto"; } else { @@ -264,6 +266,13 @@ my $starttai = Time::TAI64::unixtai64n($ my $endtai = Time::TAI64::unixtai64n($end); my $sum_SARules = 0; +# we remove non valid files +my @ARGV2; +foreach ( map { glob } @ARGV){ + push(@ARGV2,($_)); +} +@ARGV=@ARGV2; + LINE: while (<>) { my($tai,$log) = split(' ',$_,2);