how do I extract all attachments from an IMAP message? I use Objective-C and Cocoa, but are happy for generic tutorials, code or hints, too.
I think what you are saying by a "plain IMAP message" is that you have a sequence of bytes that represent an IMAP message. I'm not aware of any classes built-in to FoundationKit or AppKit which will parse this format and expose the elements of the message (such as the attachment) in the way that you seek. You'll have to either find an existing library for working with IMAP data, or roll up your sleeves and write some code to parse the contents of the email according to the IMAP spec.