mirror of
https://github.com/darold/sendmailanalyzer.git
synced 2026-06-04 22:03:19 -06:00
Fix percentage in messaging status view as spam can also be sent - Николай Петров
This commit is contained in:
parent
82b5675842
commit
106ea64147
1 changed files with 11 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue