Email Forwarders: Allow users to specify binary when piping to a script
Currently in cPanel -> Forwarders -> Add Forwarder -> Advanced Options -> Pipe to a Program, specifying a binary is not permitted and scripts must be made executable per the text in the cPanel UI:
If the script requires an interpreter such as Perl or PHP, you should omit the /usr/bin/perl or /usr/bin/php portion. Make sure that your script is executable and has the appropriate hashbang at the top of the script. If you do not know how to add the hashbang, just make sure to name your script file with the correct extension and you will be prompted to have the hashbang added automatically.
It would be nice if users were allowed to specify the binary, thus negating the need to make the script executable. Currently adding a forwarder like this:
/usr/bin/php -q /home/user/public_html/pipe.php
will result in the following:
1) /usr/bin/php -q is removed from the forwarder
2) The following text is displayed after adding the above forwarder
The program you have chosen to pipe to "//usr/bin/php -q /home/user/public_html/pipe.php" has the following problems:
needs to be executable.
To correct this, please click Fixup Piped Program
Clicking 'Fixup Piped Program' then results in the piped script having its permissions changed to be executable, and '/usr/bin/php -q' is removed from the forwarder.
Allowing users to specify the binary negates the need to make the script executable, as the script is passed through the binary.