doveadm-mail-index.c revision 64b61cd24d630223478ccbe1934b9f60f0881f59
643a81fff9003cba13deb49a565a3c8171da524dTimo Sirainen/* Copyright (c) 2010-2011 Dovecot authors, see the included COPYING file */
643a81fff9003cba13deb49a565a3c8171da524dTimo Sirainen storage_name = mail_namespace_get_storage_name(info->ns, info->name);
643a81fff9003cba13deb49a565a3c8171da524dTimo Sirainen box = mailbox_alloc(info->ns->list, storage_name,
64b61cd24d630223478ccbe1934b9f60f0881f59Timo Sirainen if (mailbox_sync(box, MAILBOX_SYNC_FLAG_FULL_READ |
643a81fff9003cba13deb49a565a3c8171da524dTimo Sirainen i_error("Syncing mailbox %s failed: %s", info->name,
643a81fff9003cba13deb49a565a3c8171da524dTimo Sirainen mail_storage_get_last_error(mailbox_get_storage(box), NULL));
643a81fff9003cba13deb49a565a3c8171da524dTimo Sirainencmd_index_run(struct doveadm_mail_cmd_context *ctx, struct mail_user *user)
643a81fff9003cba13deb49a565a3c8171da524dTimo Sirainen const enum mailbox_list_iter_flags iter_flags =
643a81fff9003cba13deb49a565a3c8171da524dTimo Sirainen NAMESPACE_PRIVATE | NAMESPACE_SHARED | NAMESPACE_PUBLIC;
643a81fff9003cba13deb49a565a3c8171da524dTimo Sirainen iter = mailbox_list_iter_init_namespaces(user->namespaces, ctx->args,
643a81fff9003cba13deb49a565a3c8171da524dTimo Sirainen while ((info = mailbox_list_iter_next(iter)) != NULL) {
643a81fff9003cba13deb49a565a3c8171da524dTimo Sirainenstatic void cmd_index_init(struct doveadm_mail_cmd_context *ctx ATTR_UNUSED,
643a81fff9003cba13deb49a565a3c8171da524dTimo Sirainen const char *const args[])
643a81fff9003cba13deb49a565a3c8171da524dTimo Sirainenstatic struct doveadm_mail_cmd_context *cmd_index_alloc(void)