The IMAP FETCH command allegedly supports retrieving individual sections of a message, including the headers and parsed sections of the body based on MIME parts. I have no idea what the support for this feature is like.
-- jh...@alum.mit.edu John Hawkinson