Mercurial > dovecot > core-2.2
changeset 20261:3edc9022b42f
doveadm fetch: Translate commas to spaces in body|binary.<section> with
This way we can do e.g.:
doveadm fetch 'uid body.header.fields(from,to,subject)' ...
Although in theory we could also change the parser to allow spaces as long
as they're inside (..), but this is probably too much extra effort.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Tue, 03 May 2016 19:42:08 +0300 |
parents | 9b5fddcd1f68 |
children | 1f4e2c3a8512 |
files | src/doveadm/doveadm-mail-fetch.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/doveadm/doveadm-mail-fetch.c Tue May 03 19:39:44 2016 +0300 +++ b/src/doveadm/doveadm-mail-fetch.c Tue May 03 19:42:08 2016 +0300 @@ -555,7 +555,7 @@ } else if (strncmp(name, "body.", 5) == 0 || strncmp(name, "binary.", 7) == 0) { bool binary = strncmp(name, "binary.", 7) == 0; - body_field.name = name; + body_field.name = t_strarray_join(t_strsplit(name, ","), " "); name += binary ? 7 : 5; if (imap_msgpart_parse(name, &msgpart) < 0) {