mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-06-11 01:30:00 -04:00
check_smtp: QUIT SMTP connection when "-D" is used
Don't forget to issue an SMTP QUIT command when the -D/--certificate option is specified. This avoids undesired MTA log messages.
This commit is contained in:
parent
5029714a9d
commit
b317aaf32a
1 changed files with 2 additions and 0 deletions
|
|
@ -276,6 +276,7 @@ main (int argc, char **argv)
|
|||
# ifdef USE_OPENSSL
|
||||
if ( check_cert ) {
|
||||
result = np_net_ssl_check_cert(days_till_exp_warn, days_till_exp_crit);
|
||||
smtp_quit();
|
||||
my_close();
|
||||
return result;
|
||||
}
|
||||
|
|
@ -607,6 +608,7 @@ process_arguments (int argc, char **argv)
|
|||
days_till_exp_warn = atoi (optarg);
|
||||
}
|
||||
check_cert = TRUE;
|
||||
ignore_send_quit_failure = TRUE;
|
||||
#else
|
||||
usage (_("SSL support not available - install OpenSSL and recompile"));
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue