From: Timo Sirainen Date: Fri, 17 Aug 2012 05:46:22 +0000 (+0300) Subject: imap: FETCH[x.MIME] for message/rfc822 should produce empty result X-Git-Tag: 2.2.alpha1~316 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c7dfbbaca710e89cd5b09cb06abdb6e0d386450;p=thirdparty%2Fdovecot%2Fcore.git imap: FETCH[x.MIME] for message/rfc822 should produce empty result --- diff --git a/src/lib-imap-storage/imap-msgpart.c b/src/lib-imap-storage/imap-msgpart.c index 21b27a8011..473670386d 100644 --- a/src/lib-imap-storage/imap-msgpart.c +++ b/src/lib-imap-storage/imap-msgpart.c @@ -526,8 +526,9 @@ imap_msgpart_find_part(struct mail *mail, const struct imap_msgpart *msgpart, switch (msgpart->fetch_type) { case FETCH_MIME: - if (part->parent == NULL) { - /* root message has no MIME headers */ + if (part->parent == NULL || + (part->parent->flags & MESSAGE_PART_FLAG_MESSAGE_RFC822) != 0) { + /* message/rfc822 itself has no MIME headers */ *part_r = NULL; return 0; }