Configure email program (postfix?) to intercept incoming and outgoing emails
Goal: Write a document with detailed instructions and explanations that solves the following
Prevent my server to be (ab)used for email spam by capturing (pipe it to a php script, provided below) the outgoing emails from all emails except for for user: mycoolapp
Intercept incoming emails to a virtual mailbox and pass it through a script (use the same script but save it under a different name).
I want to use this document and configure the mail program myself.
You will be given a brand new VPS server to work on. It will be destroyed later after the job is done.
Full description can be found here: