Is there a way to capture all mail from a unix server and pipe it to a log file? Or maybe at least all mail from PHP? I know of a trick where in php.ini sendmail is tricked byt this line:
sendmail_path = /Users/ckj/Dropbox/scripts/snydmail.sh
Where snydmail.sh just looks like this:
cat >> /path/to/file/mails.txt
This works fine on my local MAMP server, but I cannot get it working on my CentOS server.
Has anyone got a more clever way than the hack above?