Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like my mutt e-mail client to run a shell script when I receive an e-mail from a specific sender with a specific subject.

For example, when a message from foo@domain.com appears in my inbox, with a subject line matching "^Alert", mutt should run a script named ~/start-alert-process.sh.

Looking at the folder-hook documentation, I don't see a way to run an external script from mutt. Is there a better, or different, way to have mutt to run shell scripts when particular conditions are met?

share|improve this question
1  
There is no way to do that with mutt. The folder hooks are only triggered if you enter the folder, not when a message arrives in that folder. It's pretty straight forward if you route you mail through maildrop or procmail, though. – Marco Mar 1 '13 at 20:33
    
Note of course the importance and significant challenges of writing such a script securely, since it would essentially be an open internet server. – nealmcb May 21 '13 at 16:08
up vote 0 down vote accepted

It seems there's an open and assigned feature request for the mutt dev team to add the ability to run a script when a new message is received:

But as of today, it is not possible.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .