check_smtp: remove restriction of --proxy with --ssl

This commit is contained in:
Franz Schwartau 2023-06-14 20:25:50 +02:00
parent e823896d8a
commit da81dd3cf2

View file

@ -188,6 +188,13 @@ main (int argc, char **argv)
result = my_tcp_connect (server_address, server_port, &sd);
if (result == STATE_OK) { /* we connected */
/* If requested, send PROXY header */
if (use_proxy_prefix) {
if (verbose)
printf ("Sending header %s\n", PROXY_PREFIX);
my_send(PROXY_PREFIX, strlen(PROXY_PREFIX));
}
#ifdef HAVE_SSL
if (use_ssl) {
result = np_net_ssl_init_with_hostname(sd, (use_sni ? server_address : NULL));
@ -202,13 +209,6 @@ main (int argc, char **argv)
}
#endif
/* If requested, send PROXY header */
if (use_proxy_prefix) {
if (verbose)
printf ("Sending header %s\n", PROXY_PREFIX);
my_send(PROXY_PREFIX, strlen(PROXY_PREFIX));
}
/* watch for the SMTP connection string and */
/* return a WARNING status if we couldn't read any data */
if (recvlines(buffer, MAX_INPUT_BUFFER) <= 0) {
@ -718,10 +718,6 @@ process_arguments (int argc, char **argv)
usage4 (_("Set either -s/--ssl or -S/--starttls"));
}
if (use_ssl && use_proxy_prefix) {
usage4 (_("PROXY protocol (-r/--proxy) is not implemented with SSL/TLS (-s/--ssl), yet."));
}
return validate_arguments ();
}