If your mail is stored in one of those folders then yes, though it is more effcient to make the incoming mail trigger a script.
You're find some basic instructions on that on my site here.
But for what you want you just need to create a script that opens the mail files (file_get_contents, fopen etc etc) and then parse the raw mail using PEAR mail:Mime
http://pear.php.net/manual/en/package.mail.mail-mime.php
From here you'll have a object that will enable you to read the mail contents, headers, rebuild the attachments in a controlled manner