Execute application action for rules function

Hi!

I would like to run a local application with some command-line parameters when e-mail is received with specific subject and/or body (as configured by rule conditions now). For that purpose, i propose creating a new type of action – “run a program”. There should be option to pass parts (sender, recipient, subject etc) of the received email as command-line parameters.
As further option, the output (stdout) from program could be captured and sent as reply.

The idea is to remotely trigger/control some processes.

As alternate solution, forwarding an e-mail matching some rule to specific SMTP server (other than the default outgoing server) would also work (i could make the other application have internal email server). But i dont see a way to do that either currently (is there?).

Thanks!