I have a LAMP stack set up on a Debian 8 (jessie) machine. I'm trying to find a way of intercepting all outgoing mail sent by PHP (through sendmail) and instead of sending it out, deliver it to my local inbox (to the local user). I don't want to send anything to the outside world, I only want to be able to see the content of a message through my terminal.
I know that this works with Postfix, but I can't install Postfix on my machine because it conflicts with Exim4 and I don't want to make too many changes to my dev. server.
Can this be done and how?