summaryrefslogtreecommitdiffstats
path: root/plugins/check_smtp.c
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2015-10-06 21:21:17 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2015-10-06 21:21:17 (GMT)
commitb317aaf32a8a054f0274aef9137353bffef7a80c (patch)
tree0e2337a14757cefd3e18d834e07822070acafd11 /plugins/check_smtp.c
parent5029714a9dcd308e5bc813a29bd1a38bfc7ecee7 (diff)
downloadmonitoring-plugins-b317aaf32a8a054f0274aef9137353bffef7a80c.tar.gz
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.
Diffstat (limited to 'plugins/check_smtp.c')
-rw-r--r--plugins/check_smtp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c
index 56040ff..753ea3e 100644
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
@@ -276,6 +276,7 @@ main (int argc, char **argv)
276# ifdef USE_OPENSSL 276# ifdef USE_OPENSSL
277 if ( check_cert ) { 277 if ( check_cert ) {
278 result = np_net_ssl_check_cert(days_till_exp_warn, days_till_exp_crit); 278 result = np_net_ssl_check_cert(days_till_exp_warn, days_till_exp_crit);
279 smtp_quit();
279 my_close(); 280 my_close();
280 return result; 281 return result;
281 } 282 }
@@ -607,6 +608,7 @@ process_arguments (int argc, char **argv)
607 days_till_exp_warn = atoi (optarg); 608 days_till_exp_warn = atoi (optarg);
608 } 609 }
609 check_cert = TRUE; 610 check_cert = TRUE;
611 ignore_send_quit_failure = TRUE;
610#else 612#else
611 usage (_("SSL support not available - install OpenSSL and recompile")); 613 usage (_("SSL support not available - install OpenSSL and recompile"));
612#endif 614#endif