diff --git a/src/apps/protocols/smtp/lib/smtp.pm b/src/apps/protocols/smtp/lib/smtp.pm index ca0cdd5c8..cbd1c52e9 100644 --- a/src/apps/protocols/smtp/lib/smtp.pm +++ b/src/apps/protocols/smtp/lib/smtp.pm @@ -127,7 +127,7 @@ sub connect { $self->{output}->exit(); } if ($smtp_handle == -1) { - chomp $stdout; + chomp $stdout if (defined($stdout)); $self->{output}->output_add( severity => $connection_exit, short_msg => 'Unable to connect to SMTP: ' . (defined($stdout) ? $stdout : $error_msg)