[CentOS] Receive, process and send email

Sun Sep 20 17:49:29 UTC 2009
CSB <kjcsb at xnet.co.nz>

We wish to do the following:
1. receive an email with an attachment
2. process the email body to get some information from it
3. send an outbound email to an email address based on the information
derived from step 2. The email will include the attachment received in step
1

I'm not sure where to start with this one so any suggestions would be
appreciated.