mirror of
https://github.com/darold/sendmailanalyzer.git
synced 2026-05-15 14:15:56 -06:00
Remove rejected mail from top senders statistics. Thanks to Michal Paulus for the report.
This commit is contained in:
parent
9cd91eecf0
commit
e0c05f0438
2 changed files with 4 additions and 2 deletions
|
|
@ -1165,7 +1165,7 @@ sub show_stats
|
|||
} elsif ($type eq 'topsender') {
|
||||
# Get sender statistics
|
||||
&get_sender_stat($hostname,$year,$m,$d,$mon,$mday,$hour);
|
||||
&get_recipient_stat($hostname,$year,$m,$d,$mon,$mday,$hour) if ($DOMAIN);
|
||||
&get_recipient_stat($hostname,$year,$m,$d,$mon,$mday,$hour);
|
||||
} elsif ($type eq 'toprecipient') {
|
||||
# Get recipient statistics
|
||||
&get_sender_stat($hostname,$year,$m,$d,$mon,$mday,$hour) if ($DOMAIN);
|
||||
|
|
@ -3032,6 +3032,8 @@ sub compute_top_sender
|
|||
{
|
||||
foreach my $id (keys %STATS) {
|
||||
next if ($DOMAIN && ($STATS{$id}{sender} !~ /$DOMAIN/) && !grep(/$DOMAIN/, @{$STATS{$id}{rcpt}}));
|
||||
# Only compute top sender on sent messages
|
||||
next if (!grep(/Sent/, @{$STATS{$id}{status}}));
|
||||
$topsender{email}{$STATS{$id}{sender}}++;
|
||||
if ($STATS{$id}{sender} =~ /\@(.*)/) {
|
||||
$topsender{domain}{$1}++;
|
||||
|
|
|
|||
2
sa_cache
2
sa_cache
|
|
@ -654,7 +654,7 @@ sub compute_top_stats
|
|||
push(@{$topmaxrcpt{$STATS->{$id}{nrcpt}}{sender}}, $STATS->{$id}{sender});
|
||||
push(@{$topmaxrcpt{$STATS->{$id}{nrcpt}}{sa_id}}, $id);
|
||||
}
|
||||
if ($STATS->{$id}{sender}) {
|
||||
if ($STATS->{$id}{sender} && grep(/Sent/, @{$STATS->{$id}{status}})) {
|
||||
my $sender = $STATS->{$id}{sender};
|
||||
$topsender{email}{$sender}++;
|
||||
my $dom = $sender || '';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue