Incorrectly processed multiline server greeting responses as "wanted"
continue responses in smtp_endofresp(), from commit
f16c0de4e9bbe3,
which in turn broke the SMTP server detection in the test suite,
because the EHLO command would not be sent.
static bool smtp_endofresp(struct connectdata *conn, char *line, size_t len,
int *resp)
{
+ struct smtp_conn *smtpc = &conn->proto.smtpc;
bool result = FALSE;
/* Nothing for us */
*resp = 0;
}
/* Do we have a multiline (continuation) response? */
- else if(line[3] == '-') {
+ else if(line[3] == '-' && smtpc->state == SMTP_EHLO) {
result = TRUE;
*resp = 1; /* Internal response code */
}