/* Copyright (c) 2010-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "str.h"
#include "mail-namespace.h"
#include "mail-storage.h"
#include "mail-search.h"
#include "doveadm-print.h"
#include "doveadm-mail.h"
#include "doveadm-mailbox-list-iter.h"
#define ALL_STATUS_ITEMS \
(STATUS_MESSAGES | STATUS_RECENT | \
#define ALL_METADATA_ITEMS \
#define TOTAL_STATUS_ITEMS \
#define TOTAL_METADATA_ITEMS \
struct status_cmd_context {
};
const char *const *fields)
{
} else {
}
else {
"Unknown status field: %s", field);
}
"Status field %s can't be used with -t", field);
}
}
}
static void ATTR_NULL(2)
const struct mailbox_status *status,
const struct mailbox_metadata *metadata)
{
}
static void
const struct mailbox_status *status,
const struct mailbox_metadata *metadata)
{
}
static int
{
i_error("Mailbox %s: Failed to lookup mailbox status: %s",
mailbox_free(&box);
return -1;
}
else
mailbox_free(&box);
return 0;
}
static int
{
int ret = 0;
T_BEGIN {
ret = -1;
} T_END;
}
if (doveadm_mailbox_list_iter_deinit(&iter) < 0)
ret = -1;
&ctx->total_metadata);
}
return ret;
}
const char *const args[])
{
doveadm_mail_help_name("mailbox status");
}
doveadm_print_header_simple("messages");
doveadm_print_header_simple("recent");
doveadm_print_header_simple("uidnext");
doveadm_print_header_simple("uidvalidity");
doveadm_print_header_simple("unseen");
doveadm_print_header_simple("highestmodseq");
doveadm_print_header_simple("vsize");
doveadm_print_header_simple("guid");
doveadm_print_header_simple("firstsaved");
}
{
}
static bool
{
switch (c) {
case 't':
break;
case 'f':
break;
default:
return FALSE;
}
return TRUE;
}
{
}
.name = "mailbox status",
DOVEADM_CMD_PARAM('\0', "fieldstr", CMD_PARAM_STR, CMD_PARAM_FLAG_POSITIONAL | CMD_PARAM_FLAG_DO_NOT_EXPOSE) /* FIXME: horrible hack, remove me when possible */
};