I've had pretty good success with
Mail::Procmail. I don't know if your familiar with the procmail program, but it provides a simple, rules based means of parsing mail. You can build rules based on header lines, like to/from, you can also look for matches in the body or subject line. based on your rules, you can file, forward, reply, etc. or strip off the message body to a seperate text file (sounds like this is the capability you're looking for). I have it running in a couple of production applications and it has performed flawlessly. Fair warning though, some people absolutely detest procmail rules - grammar/syntax. In fact the mere mention of the word procmail can start 'religious' wars.