{
switch (conn->state) {
case SERVER_CONNECTION_STATE_EHLO:
- if (server_index == 1) {
+ if (server_index > 0) {
o_stream_nsend_str(
conn->conn.output,
"250-testserver\r\n"
case 1:
test_assert(reply->status == 535);
break;
+ case 2:
+ test_assert(reply->status == 250);
+ break;
}
}
case 1:
test_assert(reply->status == 535);
break;
+ case 2:
+ test_assert(reply->status == 250);
+ break;
}
}
case 1:
test_assert(reply->status == 535);
break;
+ case 2:
+ test_assert(reply->status == 250);
+ break;
}
}
pctx->index, smtp_reply_log(reply));
}
- test_assert(FALSE);
+
+ switch (pctx->index) {
+ case 0:
+ case 1:
+ test_assert(FALSE);
+ break;
+ case 2:
+ test_assert(TRUE);
+ break;
+ }
}
static void
case 1:
test_assert(reply->status == 535);
break;
+ case 2:
+ test_assert(reply->status == 250);
+ break;
}
}
test_expect_errors(2);
ctx = i_new(struct _authentication, 1);
- ctx->count = 2;
+ ctx->count = 3;
smtp_client = smtp_client_init(client_set);
test_begin("authentication");
test_run_client_server(&smtp_client_set,
test_client_authentication,
- test_server_authentication, 2, NULL);
+ test_server_authentication, 3, NULL);
test_end();
}
"Authentication successful\r\n");
continue;
}
+ if (str_begins(line, "EHLO ")) {
+ o_stream_nsend_str(conn->conn.output,
+ "250-testserver\r\n"
+ "250-PIPELINING\r\n"
+ "250-ENHANCEDSTATUSCODES\r\n"
+ "250-AUTH PLAIN\r\n"
+ "250 DSN\r\n");
+ continue;
+ }
o_stream_nsend_str(conn->conn.output,
"250 2.1.0 Ok\r\n");
conn->state = SERVER_CONNECTION_STATE_RCPT_TO;