mirror of
https://github.com/darold/sendmailanalyzer.git
synced 2026-05-15 14:15:56 -06:00
Fix warning: undefined value as an ARRAY reference at line 2619. Thanks to Jason Dishop for the report.
This commit is contained in:
parent
246a09b50c
commit
c2971ad32c
1 changed files with 16 additions and 10 deletions
|
|
@ -2610,17 +2610,23 @@ sub flush_data
|
|||
delete $TO{$host}{$id};
|
||||
next;
|
||||
}
|
||||
for (my $i = 0; $i <= $#{$TO{$host}{$id}{date}}; $i++) {
|
||||
# Key: year/month/day, Format: Hour:Id:Rcpt:Relay:Status
|
||||
next if ($TO{$host}{$id}{date}[$i] !~ /(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/);
|
||||
$rcpts{"$1/$2/$3"} .= "$4$5$6" . ':' . $id . ':' . $TO{$host}{$id}{to}[$i] . ':' . $TO{$host}{$id}{relay}[$i] . ':' . $TO{$host}{$id}{status}[$i] . "\n";
|
||||
$nobj++;
|
||||
if (exists $TO{$host}{$id}{date})
|
||||
{
|
||||
for (my $i = 0; $i <= $#{$TO{$host}{$id}{date}}; $i++) {
|
||||
# Key: year/month/day, Format: Hour:Id:Rcpt:Relay:Status
|
||||
next if ($TO{$host}{$id}{date}[$i] !~ /(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/);
|
||||
$rcpts{"$1/$2/$3"} .= "$4$5$6" . ':' . $id . ':' . $TO{$host}{$id}{to}[$i] . ':' . $TO{$host}{$id}{relay}[$i] . ':' . $TO{$host}{$id}{status}[$i] . "\n";
|
||||
$nobj++;
|
||||
}
|
||||
}
|
||||
for (my $i = 0; $i <= $#{$TO{$host}{$id}{queue_date}}; $i++) {
|
||||
# Key: year/month/day, Format: Hour:Id:Rcpt:Relay:Status
|
||||
next if ($TO{$host}{$id}{queue_date}[$i] !~ /(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/);
|
||||
$rcpts{"$1/$2/$3"} .= "$4$5$6" . ':' . $id . ':' . $TO{$host}{$id}{queue_to}[$i] . ":none:Queued\n";
|
||||
$nobj++;
|
||||
if (exists $TO{$host}{$id}{queue_date})
|
||||
{
|
||||
for (my $i = 0; $i <= $#{$TO{$host}{$id}{queue_date}}; $i++) {
|
||||
# Key: year/month/day, Format: Hour:Id:Rcpt:Relay:Status
|
||||
next if ($TO{$host}{$id}{queue_date}[$i] !~ /(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/);
|
||||
$rcpts{"$1/$2/$3"} .= "$4$5$6" . ':' . $id . ':' . $TO{$host}{$id}{queue_to}[$i] . ":none:Queued\n";
|
||||
$nobj++;
|
||||
}
|
||||
}
|
||||
# Complete Spam information
|
||||
if (exists $SPAM{$host}{$id} && !exists $SPAM{$host}{$id}{to}) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue