Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
1  
Have a look at this stackoverflow.com/questions/557906/… –  Iain Sep 16 '11 at 7:51

2 Answers 2

If you're already running Sendmail you can add an alias to "|/bin/whatever/you/want/to/run".

share|improve this answer

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)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.