I would like to set up an mail server on one of my hosted machines that only supports PHP. There is no standard mail server running on that machine.

Are there any mail servers written in PHP? Or, is it even possible to write a mail server in PHP in regards to the limitations of the language?