]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm fetch: Added pop3.order field.
authorTimo Sirainen <tss@iki.fi>
Fri, 7 Feb 2014 19:24:44 +0000 (14:24 -0500)
committerTimo Sirainen <tss@iki.fi>
Fri, 7 Feb 2014 19:24:44 +0000 (14:24 -0500)
src/doveadm/doveadm-mail-fetch.c

index 9fc048be87ffa9b88a1e014e6cbca2abb6c125bd..bfe5a1213ac63c4b62bb927513f737af1f80bd51 100644 (file)
@@ -402,6 +402,16 @@ static int fetch_pop3_uidl(struct fetch_cmd_context *ctx)
        return 0;
 }
 
+static int fetch_pop3_order(struct fetch_cmd_context *ctx)
+{
+       const char *value;
+
+       if (mail_get_special(ctx->mail, MAIL_FETCH_POP3_ORDER, &value) < 0)
+               return -1;
+       doveadm_print(value);
+       return 0;
+}
+
 static const struct fetch_field fetch_fields[] = {
        { "user",          0,                        fetch_user },
        { "mailbox",       0,                        fetch_mailbox },
@@ -425,7 +435,8 @@ static const struct fetch_field fetch_fields[] = {
        { "imap.envelope", MAIL_FETCH_IMAP_ENVELOPE, fetch_imap_envelope },
        { "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.uidl",     MAIL_FETCH_UIDL_BACKEND,  fetch_pop3_uidl },
+       { "pop3.order",    MAIL_FETCH_POP3_ORDER,    fetch_pop3_order }
 };
 
 static const struct fetch_field *fetch_field_find(const char *name)