doveadm-mail-iter.c revision 0dab9cb35a976c49b28a11e28d5570f5191f1a7a
84ae5edab16ad6be5e3be956cb6fa031c1428eb5Stephen Gallagher/* Copyright (c) 2010-2017 Dovecot authors, see the included COPYING file */
84ae5edab16ad6be5e3be956cb6fa031c1428eb5Stephen Gallagherint doveadm_mail_iter_init(struct doveadm_mail_cmd_context *ctx,
e9ea1b4e59384cdfe3accdf31e5c579c3dad5591Stephen Gallagher const char *const *wanted_headers,
263e4574dacb4b7d2a18d5d42122bf3dce4c45b0Stephen Gallagher struct mailbox_header_lookup_ctx *headers_ctx;
1df8e4158e752f1f010394d09e8a5e4f8201fd7eStephen Gallagher iter = i_new(struct doveadm_mail_iter, 1);
1df8e4158e752f1f010394d09e8a5e4f8201fd7eStephen Gallagher iter->box = mailbox_alloc(info->ns->list, info->vname,
1df8e4158e752f1f010394d09e8a5e4f8201fd7eStephen Gallagher MAILBOX_FLAG_IGNORE_ACLS | readonly_flag);
1df8e4158e752f1f010394d09e8a5e4f8201fd7eStephen Gallagher mailbox_set_reason(iter->box, ctx->cmd->name);
bool commit)
int ret = 0;
else if (commit) {
return ret;
int ret;
if (ret < 0) {
if (ret < 0)
if (!keep_box)
return ret;
return FALSE;
if (doveadm_is_killed()) {
return FALSE;