return 0;
case QUOTA_ALLOC_RESULT_TEMPFAIL:
/* Log the error, but allow saving anyway. */
- i_error("quota check failed: %s", error);
+ i_error("quota: Failed to check if user is under quota: %s - saving mail anyway", error);
return 0;
default:
quota_set_storage_error(qt, t->box->storage, ret, error);
break;
case QUOTA_ALLOC_RESULT_TEMPFAIL:
/* Log the error, but allow saving anyway. */
- i_error("quota allocation failed: %s", error);
+ i_error("quota: Failed to check if user is under quota: %s - saving mail anyway", error);
break;
default:
quota_set_storage_error(qt, t->box->storage, qret, error);
const char *name, uint64_t *value_r, uint64_t *limit_r,
const char **error_r)
{
+ const char *error;
uint64_t bytes_limit, count_limit;
bool ignored, kilobytes = FALSE;
int ret;
/* Get the value first. This call may also update quota limits if
they're defined externally. */
- const char *error;
- ret = root->backend.v.get_resource(root, name, value_r, &error);
+ ret = root->backend.v.get_resource(root, name, value_r, error_r);
if (ret < 0) {
- *error_r = t_strdup_printf(
- "Could not get %s from quota backend for mailbox %s: %s",
- name, mailbox_name, error);
return QUOTA_GET_RESULT_INTERNAL_ERROR;
} else if (ret == 0) {
*error_r = t_strdup_printf(
- "Requested resource %s for mailbox %s is unkown",
- name, mailbox_name);
+ "Quota backend %s doesn't support requested resource %s",
+ root->backend.name, name);
return QUOTA_GET_RESULT_UNKNOWN_RESOURCE;
}
&bytes_limit, &count_limit,
&ignored, &error) < 0) {
*error_r = t_strdup_printf(
- "Failed to get quota root rule limits: %s", error);
+ "Failed to get quota root rule limits for mailbox %s: %s",
+ mailbox_name, error);
return QUOTA_GET_RESULT_INTERNAL_ERROR;
}