lines = reply->text_lines;
if (*lines == NULL) {
+ e_error(conn->event, "Invalid handshake reply");
smtp_client_connection_fail(
conn, SMTP_CLIENT_COMMAND_ERROR_BAD_REPLY,
"Invalid handshake reply");
smtp_reply_log(reply));
if (reply->status != 220) {
if (smtp_reply_is_success(reply)) {
+ e_error(conn->event,
+ "Received inappropriate greeting");
smtp_client_connection_fail(
conn,
SMTP_CLIENT_COMMAND_ERROR_BAD_REPLY,
/* unexpected reply? */
if (conn->cmd_wait_list_head == NULL) {
- e_debug(conn->event, "Unexpected reply: %s",
+ e_error(conn->event, "Unexpected reply: %s",
smtp_reply_log(reply));
smtp_client_connection_fail(
conn, SMTP_CLIENT_COMMAND_ERROR_BAD_REPLY,
if (ret < 0 || (ret == 0 && conn->conn.input->eof)) {
if (conn->conn.input->stream_errno == ENOBUFS) {
+ e_error(conn->event, "Command reply line too long");
smtp_client_connection_fail(
conn, SMTP_CLIENT_COMMAND_ERROR_BAD_REPLY,
"Command reply line too long");
}
} else {
i_assert(error != NULL);
+ e_error(conn->event, "Invalid command reply: %s",
+ error);
smtp_client_connection_fail(
conn, SMTP_CLIENT_COMMAND_ERROR_BAD_REPLY,
t_strdup_printf("Invalid command reply: %s",
struct _premature_reply *ctx;
unsigned int i;
+ test_expect_errors(6);
+
ctx = i_new(struct _premature_reply, 1);
ctx->count = 6;
struct _early_data_reply *ctx;
unsigned int i;
+ test_expect_errors(2);
+
ctx = i_new(struct _early_data_reply, 1);
ctx->count = 3;
struct smtp_client_command *scmd;
struct _bad_reply *ctx;
+ test_expect_errors(2);
+
ctx = i_new(struct _bad_reply, 1);
ctx->count = 2;
{
struct _bad_greeting *ctx;
+ test_expect_errors(2);
+
ctx = i_new(struct _bad_greeting, 1);
ctx->count = 3;
struct _authentication_failed *ctx;
unsigned int i;
+ test_expect_errors(2);
+
ctx = i_new(struct _authentication_failed, 1);
ctx->count = 2;
test_client_defaults(&smtp_client_set);
test_begin("authentication failed");
- test_expect_errors(1);
test_run_client_server(&smtp_client_set,
test_client_authentication_failed,
test_server_authentication_failed, 2, NULL);