# HG changeset patch # User Timo Sirainen # Date 1453163453 -7200 # Node ID effb67b92547171f22640594f1c8055dcd3554a8 # Parent 791a8c6f477035cdaece36466a1a807bcad377e6 pop3c: If authentication fails, log if it was done with USER+PASS or AUTH PLAIN diff -r 791a8c6f4770 -r effb67b92547 src/lib-storage/index/pop3c/pop3c-client.c --- a/src/lib-storage/index/pop3c/pop3c-client.c Tue Jan 19 02:26:24 2016 +0200 +++ b/src/lib-storage/index/pop3c/pop3c-client.c Tue Jan 19 02:30:53 2016 +0200 @@ -54,6 +54,7 @@ enum pop3c_client_state state; enum pop3c_capability capabilities; + const char *auth_mech; pop3c_login_callback_t *login_callback; void *login_context; @@ -370,6 +371,7 @@ o_stream_nsend_str(client->output, t_strdup_printf("PASS %s\r\n", client->set.password)); client->state = POP3C_CLIENT_STATE_PASS; + client->auth_mech = "USER+PASS"; break; case POP3C_CLIENT_STATE_AUTH: if (line[0] != '+') { @@ -380,6 +382,7 @@ o_stream_nsend_str(client->output, pop3c_client_get_sasl_plain_request(client)); client->state = POP3C_CLIENT_STATE_PASS; + client->auth_mech = "AUTH PLAIN"; break; case POP3C_CLIENT_STATE_PASS: if (client->login_callback != NULL) { @@ -390,8 +393,8 @@ POP3C_COMMAND_STATE_OK : POP3C_COMMAND_STATE_ERR, reply); } else if (!success) { - i_error("pop3c(%s): Authentication failed: %s", - client->set.host, line); + i_error("pop3c(%s): Authentication via %s failed: %s", + client->set.host, client->auth_mech, line); } if (!success) return -1;