if (!already_logged_in)
client_send_line(client, MSG_BYE_INTERNAL_ERROR);
- i_error("%s", error);
+ e_error(client->event, "%s", error);
client_destroy(client, error);
return -1;
}
event_reason_end(&reason);
if (ret < 0) {
- i_error("%s", error);
+ e_error(client->event, "%s", error);
client_destroy(client, error);
}
}
MAILBOX_LIST_PATH_TYPE_DIR, &dir)) {
type = MAILBOX_LIST_PATH_TYPE_DIR;
} else {
- i_error("pop3_lock_session: Storage has no root/index directory, "
+ e_error(client->event,
+ "pop3_lock_session: Storage has no root/index directory, "
"can't create a POP3 session lock file");
return -1;
}
if (mailbox_list_mkdir_root(client->inbox_ns->list, dir, type) < 0) {
- i_error("pop3_lock_session: Couldn't create root directory %s: %s",
+ e_error(client->event,
+ "pop3_lock_session: Couldn't create root directory %s: %s",
dir, mailbox_list_get_last_internal_error(client->inbox_ns->list, NULL));
return -1;
}
ret = file_dotlock_create(&dotlock_set, path, 0,
&client->session_dotlock);
if (ret < 0)
- i_error("file_dotlock_create(%s) failed: %m", path);
+ e_error(client->event,
+ "file_dotlock_create(%s) failed: %m", path);
else if (ret > 0) {
client->to_session_dotlock_refresh =
timeout_add(POP3_SESSION_DOTLOCK_STALE_TIMEOUT_SECS*1000,
if (var_expand_with_funcs(str, client->set->pop3_logout_format,
tab, mail_user_var_expand_func_table,
client->user, &error) <= 0) {
- i_error("Failed to expand pop3_logout_format=%s: %s",
+ e_error(client->event,
+ "Failed to expand pop3_logout_format=%s: %s",
client->set->pop3_logout_format, error);
}
return str_c(str);
reason = io_stream_get_disconnect_reason(client->input,
client->output);
}
- i_info("Disconnected: %s %s", reason, client_stats(client));
+ e_info(client->event,
+ "Disconnected: %s %s", reason, client_stats(client));
}
if (client->cmd != NULL) {
seq = msgnum_to_seq(client, msgnum);
if (seq != mail->seq) {
- i_error("Message ordering changed unexpectedly "
+ e_error(client->event,
+ "Message ordering changed unexpectedly "
"(msg #%u: storage seq %u -> %u)",
msgnum+1, seq, mail->seq);
return -1;
if ((client->uidl_keymask & UIDL_MD5) != 0) {
if (mail_get_special(mail, MAIL_FETCH_HEADER_MD5,
&hdr_md5) < 0) {
- i_error("UIDL: Header MD5 lookup failed: %s",
+ e_error(client->event,
+ "UIDL: Header MD5 lookup failed: %s",
mailbox_get_last_internal_error(mail->box, NULL));
return -1;
} else if (hdr_md5[0] == '\0') {
- i_error("UIDL: Header MD5 not found "
+ e_error(client->event,
+ "UIDL: Header MD5 not found "
"(pop3_uidl_format=%%m not supported by storage?)");
return -1;
}
if ((client->uidl_keymask & UIDL_FILE_NAME) != 0) {
if (mail_get_special(mail, MAIL_FETCH_STORAGE_ID,
&filename) < 0) {
- i_error("UIDL: File name lookup failed: %s",
+ e_error(client->event,
+ "UIDL: File name lookup failed: %s",
mailbox_get_last_internal_error(mail->box, NULL));
return -1;
} else if (filename[0] == '\0') {
- i_error("UIDL: File name not found "
+ e_error(client->event,
+ "UIDL: File name not found "
"(pop3_uidl_format=%%f not supported by storage?)");
return -1;
}
if ((client->uidl_keymask & UIDL_GUID) != 0) {
if (mail_get_special(mail, MAIL_FETCH_GUID,
&guid) < 0) {
- i_error("UIDL: Message GUID lookup failed: %s",
+ e_error(client->event,
+ "UIDL: Message GUID lookup failed: %s",
mailbox_get_last_internal_error(mail->box, NULL));
return -1;
} else if (guid[0] == '\0') {
- i_error("UIDL: Message GUID not found "
+ e_error(client->event,
+ "UIDL: Message GUID not found "
"(pop3_uidl_format=%%g not supported by storage?)");
return -1;
}
if (var_expand(str, client->mail_set->pop3_uidl_format,
tab, &error) <= 0) {
- i_error("UIDL: Failed to expand pop3_uidl_format=%s: %s",
+ e_error(client->event,
+ "UIDL: Failed to expand pop3_uidl_format=%s: %s",
client->mail_set->pop3_uidl_format, error);
return -1;
}