Skip to content

Commit

Permalink
Interpret NULL as disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
NEMS Linux committed Mar 7, 2019
1 parent f4de6a7 commit 27105e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions data/1.5/nagios/plugins/nems_sendmail_host
Expand Up @@ -508,8 +508,8 @@ $mail->isSMTP();
$mailserver = explode(':',$nems['resource']['USER7']);
$mail->Host = $mailserver[0];
$mail->Port = $mailserver[1];
// NEMS00001 if user has an empty username, treat as no SMTP auth
if (strlen($nems['resource']['USER9']) > 0) {
// NEMS00002 if user has an empty username, treat as no SMTP auth
if (strlen($nems['resource']['USER9']) > 0 && strtoupper($nems['resource']['USER9']) != 'NULL') {
$mail->SMTPAuth = true;
$mail->Username = $nems['resource']['USER9'];
$mail->Password = $nems['resource']['USER10'];
Expand Down
4 changes: 2 additions & 2 deletions data/1.5/nagios/plugins/nems_sendmail_service
Expand Up @@ -535,8 +535,8 @@ $mail->isSMTP();
$mailserver = explode(':',$nems['resource']['USER7']);
$mail->Host = $mailserver[0];
$mail->Port = $mailserver[1];
// NEMS00001 if user has an empty username, treat as no SMTP auth
if (strlen($nems['resource']['USER9']) > 0) {
// NEMS00002 if user has an empty username, treat as no SMTP auth
if (strlen($nems['resource']['USER9']) > 0 && strtoupper($nems['resource']['USER9']) != 'NULL') {
$mail->SMTPAuth = true;
$mail->Username = $nems['resource']['USER9'];
$mail->Password = $nems['resource']['USER10'];
Expand Down

0 comments on commit 27105e0

Please sign in to comment.