dovecot-2.0: doveadm fetch hdr.*: Show the hdr.name prefix even ...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Jun 21 19:23:30 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/172a0c7cebbb
changeset: 11602:172a0c7cebbb
user: Timo Sirainen <tss at iki.fi>
date: Mon Jun 21 17:23:25 2010 +0100
description:
doveadm fetch hdr.*: Show the hdr.name prefix even if the header doestn't exist.
diffstat:
src/doveadm/doveadm-mail-fetch.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diffs (17 lines):
diff -r 52e2f3a8054f -r 172a0c7cebbb src/doveadm/doveadm-mail-fetch.c
--- a/src/doveadm/doveadm-mail-fetch.c Mon Jun 21 17:21:30 2010 +0100
+++ b/src/doveadm/doveadm-mail-fetch.c Mon Jun 21 17:23:25 2010 +0100
@@ -145,6 +145,13 @@
if (mail_get_headers(ctx->mail, ctx->cur_field->name, &value) < 0)
return -1;
+ if (*value == NULL) {
+ /* no value */
+ if (ctx->print_field_prefix)
+ str_printfa(ctx->hdr, "hdr.%s: ", ctx->cur_field->name);
+ return 0;
+ }
+
for (; *value != NULL; value++) {
if (add_lf)
str_append_c(ctx->hdr, '\n');
More information about the dovecot-cvs
mailing list