From 106ea64147331ef1fe0569e54b8f2d68ef16cfe0 Mon Sep 17 00:00:00 2001 From: Darold Date: Sun, 29 Apr 2012 16:47:56 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20percentage=20in=20messaging=20status=20vi?= =?UTF-8?q?ew=20as=20spam=20can=20also=20be=20sent=20-=20=D0=9D=D0=B8?= =?UTF-8?q?=D0=BA=D0=BE=D0=BB=D0=B0=D0=B9=20=D0=9F=D0=B5=D1=82=D1=80=D0=BE?= =?UTF-8?q?=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cgi-bin/sa_report.cgi | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cgi-bin/sa_report.cgi b/cgi-bin/sa_report.cgi index 5c99905..4472008 100644 --- a/cgi-bin/sa_report.cgi +++ b/cgi-bin/sa_report.cgi @@ -2389,6 +2389,13 @@ sub compute_statusflow next if ($mailbox && ($STATS{$id}{rcpt}[$i] !~ /$mailbox\@/) ); $GLOBAL_STATUS{"$STATS{$id}{status}[$i]"}++; $GLOBAL_STATUS{"$STATS{$id}{status}[$i]" . '_bytes'} += $STATS{$id}{size}; + if ($STATS{$id}{status}[$i] eq 'Sent') { + if (exists $STATS{$id}{spam}) { + $GLOBAL_STATUS{Spam_Sent}++; + } elsif (exists $STATS{$id}{virus}) { + $GLOBAL_STATUS{Virus_Sent}++; + } + } } if (exists $STATS{$id}{spam}) { $GLOBAL_STATUS{Spam}++; @@ -2431,6 +2438,10 @@ sub display_statusflow foreach (sort {$GLOBAL_STATUS{$b} <=> $GLOBAL_STATUS{$a}} keys %GLOBAL_STATUS) { next if ( ($_ eq '') || /Command rejected/); next if (/_bytes/ || /virus /); + if (/_Sent$/) { + $delivery_global_total -= $GLOBAL_STATUS{$_}; + next + } $delivery_global_total += $GLOBAL_STATUS{$_}; } my $delivery_total = $GLOBAL_STATUS{Sent} || 1;