From: Timo Sirainen Date: Sun, 25 Apr 2004 22:30:25 +0000 (+0300) Subject: Fixes for fetching BODY[n], patch by Rick Jones X-Git-Tag: 1.1.alpha1~4197 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=006abdf1d83c078ad7a053274dda852060b5773f;p=thirdparty%2Fdovecot%2Fcore.git Fixes for fetching BODY[n], patch by Rick Jones --HG-- branch : HEAD --- diff --git a/src/imap/imap-fetch-body-section.c b/src/imap/imap-fetch-body-section.c index a466738f53..5e16dfc676 100644 --- a/src/imap/imap-fetch-body-section.c +++ b/src/imap/imap-fetch-body-section.c @@ -462,8 +462,10 @@ static int part_find(struct mail *mail, const struct imap_fetch_body_data *body, } if (part != NULL && - (part->flags & MESSAGE_PART_FLAG_MESSAGE_RFC822)) { - /* skip the message/rfc822 part */ + (part->flags & MESSAGE_PART_FLAG_MESSAGE_RFC822) && + (*path >= '0' && *path <= '9' || strncmp(path, "HEADER", 6) == 0)) { + /* if remainder of path is a number or "HEADER", + skip the message/rfc822 part */ part = part->children; } }