Hi all As I'm sure you're aware, these days people tend to send really quite huge messages, 2MB and upward. I'm forever just hitting Enter on new messages without looking at their size beforehand and then being stuck waiting for several seconds while Mutt downloads the entire RFC822 message, even though I usually only want to read the text MIME part and then potentially save some other part to disk or open it separately.
It seems to me that it would probably not be a huge amount of work to get Mutt to support BODYSTRUCTURE in imap/message.c, i.e. in imap_fetch_message: - first issue UID FETCH <uid> BODYSTRUCTURE - parse the BODYSTRUCTURE response and discover the MIME part number corresponding to the text part, respecting multipart/alternative etc - issue UID FETCH BODY[<part>] - populate the MESSAGE with just that part of the result. So as far as displaying the message normally is concerned, we would just be showing the text part (although we could indicate the presence of other parts if desired). This would mean making some changes to the MESSAGE structure to get it to be aware that not all MIME parts are yet loaded, and that subsequent calls to UID FETCH BODY[<part>] are required to load in not-yet-loaded parts when we're in Mutt's MIME-part outline view. It would also mean doing a bit of BODYSTRUCTURE parsing (since imap_next_word is not really up to the job for this) and integrating that result somehow with the standard MIME parsing that Mutt does for messages. What do people think to this? Is any developer with a good understanding of Mutt internals interested in working on this? I'm pretty familiar with the protocol level stuff and MIME parsing but not so much with Mutt internal data structures and choreography. -- Chris Burdess