I'm interested in implementing the advanced content filter example for postfix.
socat tcp-listen:10026,reuseaddr,fork tcp:localhost:10025
This is a simple "passthru" that works, but obviously doesn't do any filtering or responding.
My goal is to have this socat command work exactly as it does (two-way forwarding between the two connections), but also one-way forward its input to a PHP script.
How would I do that?
For more background... I would like to avoid the limitations of the "simple" content filter via
pipe but I don't want to implement a full SMTP client and server to handle the
postfix <--> filter <--> postfix transaction.
I do not need to filter the mail, but I do need to track it. My thought is that I could forward the network traffic per usual, but have a PHP script that tracks the data passing over the wire.