dovecot-2.2: doveadm fetch: Added "refcount" field.
dovecot at dovecot.org
dovecot at dovecot.org
Thu Jun 11 16:10:43 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/ffecdb676c53
changeset: 18842:ffecdb676c53
user: Timo Sirainen <tss at iki.fi>
date: Thu Jun 11 19:08:13 2015 +0300
description:
doveadm fetch: Added "refcount" field.
diffstat:
src/doveadm/doveadm-mail-fetch.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diffs (30 lines):
diff -r 34fad121ec7b -r ffecdb676c53 src/doveadm/doveadm-mail-fetch.c
--- a/src/doveadm/doveadm-mail-fetch.c Thu Jun 11 16:19:05 2015 +0300
+++ b/src/doveadm/doveadm-mail-fetch.c Thu Jun 11 19:08:13 2015 +0300
@@ -376,6 +376,16 @@
return 0;
}
+static int fetch_refcount(struct fetch_cmd_context *ctx)
+{
+ const char *value;
+
+ if (mail_get_special(ctx->mail, MAIL_FETCH_REFCOUNT, &value) < 0)
+ return -1;
+ doveadm_print(value);
+ return 0;
+}
+
static const struct fetch_field fetch_fields[] = {
{ "user", 0, fetch_user },
{ "mailbox", 0, fetch_mailbox },
@@ -401,7 +411,8 @@
{ "imap.body", MAIL_FETCH_IMAP_BODY, fetch_imap_body },
{ "imap.bodystructure", MAIL_FETCH_IMAP_BODYSTRUCTURE, fetch_imap_bodystructure },
{ "pop3.uidl", MAIL_FETCH_UIDL_BACKEND, fetch_pop3_uidl },
- { "pop3.order", MAIL_FETCH_POP3_ORDER, fetch_pop3_order }
+ { "pop3.order", MAIL_FETCH_POP3_ORDER, fetch_pop3_order },
+ { "refcount", MAIL_FETCH_REFCOUNT, fetch_refcount }
};
static const struct fetch_field *fetch_field_find(const char *name)
More information about the dovecot-cvs
mailing list