enum quota_alloc_result ret;
ret = trash_next_quota_test_alloc(ctx, size, error_r);
if (ret != QUOTA_ALLOC_RESULT_OVER_QUOTA) {
- if (ret == QUOTA_ALLOC_RESULT_OVER_QUOTA_LIMIT &&
- ctx->quota->user->mail_debug)
- i_debug("trash plugin: Mail is larger than "
+ if (ret == QUOTA_ALLOC_RESULT_OVER_QUOTA_LIMIT) {
+ e_debug(ctx->quota->user->event,
+ "trash plugin: Mail is larger than "
"quota, won't even try to handle");
+ }
return ret;
}
fd = open(path, O_RDONLY);
if (fd == -1) {
- i_error("trash plugin: open(%s) failed: %m", path);
+ e_error(user->event, "trash plugin: open(%s) failed: %m", path);
return -1;
}
trash->name = p_strdup(user->pool, name+1);
if (str_to_int(t_strdup_until(line, name),
&trash->priority) < 0) {
- i_error("trash: Invalid priority for mailbox '%s'",
+ e_error(user->event,
+ "trash: Invalid priority for mailbox '%s'",
trash->name);
ret = -1;
}
if (!uni_utf8_str_is_valid(trash->name)) {
- i_error("trash: Mailbox name not UTF-8: %s",
+ e_error(user->event,
+ "trash: Mailbox name not UTF-8: %s",
trash->name);
ret = -1;
}
if (!trash_find_storage(user, trash)) {
- i_error("trash: Namespace not found for mailbox '%s'",
+ e_error(user->event,
+ "trash: Namespace not found for mailbox '%s'",
trash->name);
ret = -1;
}
env = mail_user_plugin_getenv(user, "trash");
if (env == NULL) {
- e_debug(user->event, "trash: No trash setting - plugin disabled");
+ e_debug(user->event,
+ "trash: No trash setting - plugin disabled");
} else if (quser == NULL) {
- i_error("trash plugin: quota plugin not initialized");
+ e_error(user->event,
+ "trash plugin: quota plugin not initialized");
} else {
tuser = p_new(user->pool, struct trash_user, 1);
tuser->config_file = env;