Mercurial > dovecot > core-2.2
changeset 19259:2ceca0becf8e
doveadm fetch: Added "storageid" field.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 30 Sep 2015 18:50:09 +0300 |
parents | b631f67f56d3 |
children | 39ae1789ba74 |
files | src/doveadm/doveadm-mail-fetch.c |
diffstat | 1 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/doveadm/doveadm-mail-fetch.c Wed Sep 30 18:49:39 2015 +0300 +++ b/src/doveadm/doveadm-mail-fetch.c Wed Sep 30 18:50:09 2015 +0300 @@ -386,6 +386,16 @@ return 0; } +static int fetch_storageid(struct fetch_cmd_context *ctx) +{ + const char *value; + + if (mail_get_special(ctx->mail, MAIL_FETCH_STORAGE_ID, &value) < 0) + return -1; + doveadm_print(value); + return 0; +} + static const struct fetch_field fetch_fields[] = { { "user", 0, fetch_user }, { "mailbox", 0, fetch_mailbox }, @@ -412,7 +422,8 @@ { "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 }, - { "refcount", MAIL_FETCH_REFCOUNT, fetch_refcount } + { "refcount", MAIL_FETCH_REFCOUNT, fetch_refcount }, + { "storageid", MAIL_FETCH_STORAGE_ID, fetch_storageid } }; static const struct fetch_field *fetch_field_find(const char *name)