Selaa lähdekoodia

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.
Holger Weiss 10 vuotta sitten
vanhempi
commit
36a36d48a6
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2 0
      plugins/check_smtp.c

+ 2 - 0
plugins/check_smtp.c

@@ -286,6 +286,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;
 		  }
@@ -612,6 +613,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