It wouldnt be too tough to write in php. I would search stack overflow for a slolution but essential this is what i would do.
I would create an actual email address with a catch all alias associated to it. Then in MySQL i would create the email addresses that i want to recieve mail to.
So i would have :
(you can name them whatever you want)
when someone sends email to any of these addresses, it would go to the firstname.lastname@example.org email address and sit in the inbox.
Next create a php script that can use pop to read emails and delete them from the server. I think PHP has built in functions for this. The script would check the send to address and look it up in your database. Then i could forward it to the right recipeient (this is what craigslist does), or it could be more elaborate and put the message in your database for an internal messaging system (sorta like linkedin or facebook)
Not that tough to build at all.