Nov 10, 2018

How to pipe email to script in CPanel

From CPanel, Mail -> Account Level Filtering -> Create a New Filter:

For python script, put
python path/from/your/home/your-script.py -q
For php script, put
php -q path/from/your/home/your-script.php 
-q is to suppress the output.