Further to the above you will need to make an entry in the aliases file as well so as to pass the email on to the script, sample below:
test: |"/usr/local/bin/unmime"
Another option is to use munpack (part of the mpack package), an aliases entry like this should do it for you:
test1: |"/usr/local/bin/munpack -C /var/tmp/MIME"
The paths are as I use it, you may have to change to suit your application and installation.
IBM Certified Confused - MQSeries
IBM Certified Flabbergasted - AIX 5 pSeries System Administration
MS Certified Windblows Rebooter