Procmail question

Hi all,

I am trying to write a small app that will interact with an email inbox. However, I want the application to be able to catch emails that may come to my domain that may be invalid. For example, I’d like my app to log some stuff in the database for an email sent to…where “someuser” isn’t a valid account that I have set up.

My question is, can I use Procmail (or some other proudct available to dreamhost hosting):

  1. Capture all email to my domain
  2. Capture the information from emails sent to my domain that may be invalid email addresses

Thanks for any help!