Skip to content

Commit

Permalink
fixed the error message 'Use of uninitialized value '[5]' in join or …
Browse files Browse the repository at this point in the history
…string at /usr/lib/monitorix/mail.pm line 668
  • Loading branch information
mikaku committed Nov 24, 2023
1 parent ffaa2b4 commit 487d32d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/mail.pm
Original file line number Diff line number Diff line change
Expand Up @@ -630,19 +630,19 @@ sub mail_update {
$gen[4] /= 60 if lc($mail->{stats_rate}) eq "per_second";
}

$gen_h[5] = $gen[5] = 0;
$gen_h[6] = $gen[6] = 0;
$gen_h[7] = $gen[7] = 0;
$gen_h[8] = $gen[8] = 0;
$gen_h[9] = $gen[9] = 0;

if(lc($mail->{greylist}) eq "milter-greylist") {
$gen_h[5] = $gen[5] = 0;
$gen_h[6] = $gen[6] = int($gl_records) || 0;
$gen_h[7] = $gen[7] = int($gl_greylisted) || 0;
$gen_h[8] = $gen[8] = int($gl_whitelisted) || 0;
$gen_h[9] = $gen[9] = int($gl_delayed) || 0;
}
if(lc($mail->{greylist}) eq "postgrey") {
$gen_h[5] = $gen[5] = 0;
$gen_h[6] = $gen[6] = 0;
$gen_h[7] = $gen[7] = 0;
$gen_h[8] = $gen[8] = 0;
$gen_h[9] = $gen[9] = 0;
# avoid initial peak
if(!$first_read) {
$gen[6] = int($gl_records);
Expand Down

0 comments on commit 487d32d

Please sign in to comment.