doveadm-mail-altmove.c revision ab406f5c4fd6373ead6c095dc1c33525b789da19
/* Copyright (c) 2010-2012 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "mail-index.h"
#include "mail-storage.h"
#include "mail-namespace.h"
#include "doveadm-mailbox-list-iter.h"
#include "doveadm-mail-iter.h"
#include "doveadm-mail.h"
struct altmove_cmd_context {
struct doveadm_mail_cmd_context ctx;
bool reverse;
};
static int
const struct mailbox_info *info,
{
struct doveadm_mail_iter *iter;
struct mailbox_transaction_context *trans;
enum modify_type modify_type =
return -1;
if (doveadm_debug) {
i_debug("altmove: box=%s uid=%u",
}
}
return doveadm_mail_iter_deinit_sync(&iter);
}
static int
{
return -1;
}
return 0;
}
static int
{
const enum mailbox_list_iter_flags iter_flags =
struct doveadm_mailbox_list_iter *iter;
const struct mailbox_info *info;
struct mail_storage *const *storages;
unsigned int i, count;
int ret = 0;
ret = -1;
}
}
ret = -1;
} T_END;
if (doveadm_mailbox_list_iter_deinit(&iter) < 0)
ret = -1;
ret = -1;
}
/* make sure all private storages have been purged */
continue;
for (i = 0; i < count; i++) {
break;
}
if (i == count) {
ret = -1;
}
}
return ret;
}
const char *const args[])
{
doveadm_mail_help_name("altmove");
}
static bool
{
switch (c) {
case 'r':
break;
default:
return FALSE;
}
return TRUE;
}
static struct doveadm_mail_cmd_context *cmd_altmove_alloc(void)
{
struct altmove_cmd_context *ctx;
}
struct doveadm_mail_cmd cmd_altmove = {
};