Thursday, May 10, 2012

Howto run a process automatically when a certain mail is downloaded by Thunderbird

In order to run a file whenever a certain mail arrives to my inbox I created a filter using the Thunderbird add-on FiltaQuilla. The add-on expand the messages filtering options and add an option to "run a file". when a certain mail match the filter, Thunderbird will run the file specified. I use a python code - code.py so in the filter configuration under Linux (Fedora core 14) I use this line:

/usr/bin/python,/home/UserName/code.py,-a

The line is a comma separated 3 parts line. The first part is the python interperter, the second is the script name to run and the last part is an argument needed for the script to run. Omitting the first part and the filter wont work.