in reply to PINE, Perl, pipes, and attachments

The next step is a bit scary. Am I smart enough to let procmail do all of this for me?

You could always use one of the many Perl modules that parse email attachments.