These ones that are left are all rather unnecessary.
/* Server metadata shouldn't depend on INBOX's ACLs, so ignore them. */
box = mailbox_alloc(ns->list, "INBOX", MAILBOX_FLAG_IGNORE_ACLS |
MAILBOX_FLAG_ATTRIBUTE_SESSION);
- mailbox_set_reason(box, "Server METADATA");
imtrans = imap_metadata_transaction_begin(box);
imtrans->server = TRUE;
return imtrans;
if (mpurl->selected_box != NULL &&
mailbox_equals(mpurl->selected_box, ns, mpurl->mailbox))
box = mpurl->selected_box;
- else {
+ else
box = mailbox_alloc(ns->list, mpurl->mailbox, flags);
- mailbox_set_reason(box, "Read IMAP URL");
- }
if (mailbox_open(box) < 0) {
*client_error_r = mail_storage_get_last_error(mailbox_get_storage(box),
error_code_r);
MAILBOX_LIST_ITER_RETURN_NO_FLAGS);
while ((info = mailbox_list_iter_next(iter)) != NULL) {
box = mailbox_alloc(info->ns->list, info->vname, 0);
- mailbox_set_reason(box, "URLAUTH reset all keys");
if (imap_urlauth_backend_mailbox_reset_key(box) < 0)
ret = -1;
mailbox_free(&box);
synced, so it'll contain the newly written mail. this is racy, so
it's possible another process has already deleted the mail. */
box = mailbox_alloc(orig_box->list, orig_box->vname, 0);
- mailbox_set_reason(box, "lib-lda storage-id");
-
mail = mail_deliver_open_mail(box, uid, MAIL_FETCH_STORAGE_ID, &t);
if (mail != NULL) {
if (mail_get_special(mail, MAIL_FETCH_STORAGE_ID, &storage_id) < 0 ||
if (muser->deliver_ctx == NULL)
return;
- if ((box->flags & MAILBOX_FLAG_POST_SESSION) != 0)
- mailbox_set_reason(box, "lib-lda delivery");
-
mbox = p_new(box->pool, struct mail_deliver_mailbox, 1);
mbox->module_ctx.super = *v;
box->vlast = &mbox->module_ctx.super;
/* this should be NoSelect but since inbox can never be
NoSelect we use EXISTENCE_NONE to avoid creating inbox by accident */
- mailbox_set_reason(inbox, "copy caching decisions");
if (mailbox_exists(inbox, FALSE, &existence) == 0 &&
existence != MAILBOX_EXISTENCE_NONE &&
mailbox_open(inbox) == 0 &&
mail_storage_service_user_get_log_prefix(llrcpt->service_user));
ns = mail_namespace_find_inbox(user->namespaces);
box = mailbox_alloc(ns->list, "INBOX", 0);
- mailbox_set_reason(box, "over-quota check");
ret = mailbox_get_status(box, STATUS_CHECK_OVER_QUOTA, &status);
if (ret < 0) {
error = mailbox_get_last_error(box, &mail_error);
ns = mail_namespace_find_inbox(user->namespaces);
box = mailbox_alloc(ns->list, "INBOX", MAILBOX_FLAG_POST_SESSION);
- mailbox_set_reason(box, "quota status");
ctx = quota_transaction_begin(box);
const char *internal_error;
ns = mail_namespace_find(user->namespaces, mailbox);
bbox->box = mailbox_alloc(ns->list, mailbox, flags);
MODULE_CONTEXT_SET(bbox->box, virtual_storage_module, bbox);
- mailbox_set_reason(bbox->box, mbox->box.reason == NULL ?
- t_strdup_printf("virtual mailbox %s", mailbox_get_vname(&mbox->box)) :
- t_strdup_printf("virtual mailbox %s: %s", mailbox_get_vname(&mbox->box), mbox->box.reason));
if (bbox == mbox->save_bbox) {
/* Assume that the save_bbox exists, whether or not it truly