client->id_logged = TRUE;
if (client->cmd_id->log_reply != NULL) {
- client_log(&client->common, t_strdup_printf(
- "ID sent: %s", str_c(client->cmd_id->log_reply)));
+ e_info(client->common.event, "ID sent: %s",
+ str_c(client->cmd_id->log_reply));
}
}
str_printfa(str, " (master %s)", client->proxy_master_user);
str_append(str, ": ");
str_append(str, line);
- client_log(client, str_c(str));
+ e_info(client->event, "%s", str_c(str));
}
void client_proxy_failed(struct client *client, bool send_line)
{
if (!client->secured && strcmp(client->ssl_set->ssl, "required") == 0) {
if (client->set->auth_verbose) {
- client_log(client, "Login failed: "
- "SSL required for authentication");
+ e_info(client->event, "Login failed: "
+ "SSL required for authentication");
}
client->auth_attempts++;
client_auth_result(client, CLIENT_AUTH_RESULT_SSL_REQUIRED, NULL,
return TRUE;
if (client->set->auth_verbose) {
- client_log(client, "Login failed: "
- "Plaintext authentication disabled");
+ e_info(client->event, "Login failed: "
+ "Plaintext authentication disabled");
}
if (pass_sent) {
client_notify_status(client, TRUE,
reason = t_strconcat(reason, " ", extra_reason, NULL);
}
if (reason != NULL)
- client_log(client, reason);
+ e_info(client->event, "%s", reason);
if (client->output != NULL)
o_stream_uncork(client->output);
i_assert(client->fd != -1);
if (strcmp(client->ssl_set->ssl, "no") == 0) {
- client_log(client, "SSL is disabled (ssl=no)");
+ e_info(client->event, "SSL is disabled (ssl=no)");
return -1;
}
delay_ms = login_proxy_delay_disconnect(proxy);
ipstr = net_ip2addr(&proxy->client->ip);
- client_log(proxy->client, t_strdup_printf(
- "proxy(%s): disconnecting %s%s%s",
- proxy->client->virtual_user,
- ipstr != NULL ? ipstr : "",
- reason == NULL ? "" : t_strdup_printf(" (%s)", reason),
- delay_ms == 0 ? "" : t_strdup_printf(" - disconnecting client in %ums", delay_ms)));
+ e_info(proxy->client->event, "proxy(%s): disconnecting %s%s%s",
+ proxy->client->virtual_user,
+ ipstr != NULL ? ipstr : "",
+ reason == NULL ? "" : t_strdup_printf(" (%s)", reason),
+ delay_ms == 0 ? "" : t_strdup_printf(" - disconnecting client in %ums", delay_ms));
i_assert(detached_login_proxies_count > 0);
detached_login_proxies_count--;
if (client->set->auth_verbose && reason != NULL) {
const char *auth_name =
str_sanitize(client->auth_mech_name, MAX_MECH_NAME);
- client_log(client, t_strdup_printf(
- "Authenticate %s failed: %s", auth_name, reason));
+ e_info(client->event, "Authenticate %s failed: %s",
+ auth_name, reason);
}
client->authenticating = FALSE;
if (pop3_client->apop_challenge == NULL) {
if (client->set->auth_verbose)
- client_log(client, "APOP failed: APOP not enabled");
+ e_info(client->event, "APOP failed: APOP not enabled");
client_send_reply(client, POP3_CMD_REPLY_ERROR,
"APOP not enabled.");
return TRUE;
p = strchr(args, ' ');
if (p == NULL || strlen(p+1) != 32) {
if (client->set->auth_verbose)
- client_log(client, "APOP failed: Invalid parameters");
+ e_info(client->event, "APOP failed: Invalid parameters");
client_send_reply(client, POP3_CMD_REPLY_ERROR,
"Invalid parameters.");
return TRUE;
if (hex_to_binary(p+1, apop_data) < 0) {
if (client->set->auth_verbose) {
- client_log(client, "APOP failed: "
- "Invalid characters in MD5 response");
+ e_info(client->event, "APOP failed: "
+ "Invalid characters in MD5 response");
}
client_send_reply(client, POP3_CMD_REPLY_ERROR,
"Invalid characters in MD5 response.");