use a postfix target pipeline. You can even put in business logic
<name> unix - n n - - pipe
flags=DORX user=<linux_user> argv=<path to script>
it will just pipe it in via stdin so a classic argv / argc application
thecodingmachine.io/triggering-a-php-script-when-…
for php :)
Just don't forget to use php.net/manual/en/book.mailparse.php and check if the body is correct and use a dedicated email (probably with a hash in front of it so the spam attacks are not that probable)
i hope that helps.
j
stuff ;)