]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: FETCH[x.MIME] for message/rfc822 should produce empty result
authorTimo Sirainen <tss@iki.fi>
Fri, 17 Aug 2012 05:46:22 +0000 (08:46 +0300)
committerTimo Sirainen <tss@iki.fi>
Fri, 17 Aug 2012 05:46:22 +0000 (08:46 +0300)
src/lib-imap-storage/imap-msgpart.c

index 21b27a8011413479f5443b516c1aa618594d8e4b..473670386d17d52c7e1edb877dcbe3f2ee008861 100644 (file)
@@ -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;
                }