summatix Asked: 2011-09-16 23:13:28 +0800 CST2011-09-16 23:13:28 +0800 CST 2011-09-16 23:13:28 +0800 CST Easiest way to call script for incoming email 772 On a Ubuntu server, what's the easiest way to run a script (e.g. Python) when an email is received? Email filters would be good, but not necessary. scripting email sendmail procmail 2 Answers Voted symcbean 2011-09-17T03:47:13+08:002011-09-17T03:47:13+08:00 Via procmail. (note this doc starts by suggesting using the .forward mechanism to invoke procmail from the MDA - its a lot simpler to use procmail AS the MDA) Craig Constantine 2011-09-17T05:19:08+08:002011-09-17T05:19:08+08:00 If you're already running Sendmail you can add an alias to "|/bin/whatever/you/want/to/run".
Via procmail. (note this doc starts by suggesting using the .forward mechanism to invoke procmail from the MDA - its a lot simpler to use procmail AS the MDA)
If you're already running Sendmail you can add an alias to "|/bin/whatever/you/want/to/run".