[ Thanks to Falko
Timme for this link. ]
“If you have more than a few websites, it is a pain to
detect which of the sites is vulnerable and sends the spam emails.
This tutorial explains the installation of a small wrapper script
which logs email messages sent trough the PHP mail() function. I’m
using Debian Linux here for this tutorial but the script should
work on any Linux distribution.”