diff --git a/lib/smtp.c b/lib/smtp.c index 45df3042e71ef53cd28c7df923299ebcad357afa..d14c44be4085bfe65c7f54a761f1e8525e73435c 100644 --- a/lib/smtp.c +++ b/lib/smtp.c @@ -325,7 +325,7 @@ static CURLcode smtp_state_ehlo_resp(struct connectdata *conn, (void)instate; /* no use for this yet */ if(smtpcode/100 != 2) { - if(data->set.ftp_ssl > CURLUSESSL_TRY && !conn->ssl[FIRSTSOCKET].use) + if(data->set.ftp_ssl <= CURLUSESSL_TRY) result = smtp_state_helo(conn); else { failf(data, "Access denied: %d", smtpcode); diff --git a/tests/data/DISABLED b/tests/data/DISABLED index 24bc532c2c059bc3a48ac3031f43d8e7e29269d5..c65cdd90b9470e64113fcc9c92c942bd8e09f06b 100644 --- a/tests/data/DISABLED +++ b/tests/data/DISABLED @@ -7,4 +7,3 @@ 564 802 803 -804 diff --git a/tests/data/test804 b/tests/data/test804 index e1fc419e9422af2949105a6be09181f9f2fd13d2..3d490c52b84e9c2270f1c4bc4c07899ccfb13f33 100644 --- a/tests/data/test804 +++ b/tests/data/test804 @@ -1,59 +1,59 @@ - - - -SMTP -SMTP HELO -RFC821 - - + + + +SMTP +SMTP HELO +RFC821 + + + +# +# Server-side + + +REPLY EHLO 500 Command unrecognized +REPLY HELO 250 Already old but still servicing... + + + +# +# Client-side + + +smtp + + +RFC821-only SMTP server (EHLO not supported) + + +From: different +To: another + +body + + +smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 804@foo --mail-from 804@from -T - + + + +# +# Verify data after the test has been "shot" + + +EHLO user +HELO user +MAIL FROM:804@from +RCPT TO:<804@foo> +DATA +QUIT + + +From: different +To: another + +body -# -# Server-side - - -REPLY EHLO 500 Command unrecognized -REPLY HELO 250 Already old but still servicing... - - - -# -# Client-side - - -smtp - - -RFC821-only SMTP server (EHLO not supported) - - -From: different -To: another - -body - - -smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 804@foo --mail-from 804@from -T - - - - -# -# Verify data after the test has been "shot" - - -EHLO user -HELO user -MAIL FROM:804@from -RCPT TO:<804@foo> -DATA -QUIT - - -From: different -To: another - -body - -. - - - +. + + +