Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 to have a Terminal command run when I receive an email in Thunderbird from a certain address with a certain subject. Is there a way to do this on a Mac?

share|improve this question

migrated from Apr 1 '12 at 22:25

This question came from our site for professional and enthusiast programmers.

What does your code currently look like for receiving emails? – sarnold Apr 1 '12 at 21:47
I currently only have code for the Terminal command. I was hoping to rely on an email program to take care of the receiving email part. It looks like only Mail can do such a thing? I'm a Thunderbird user and I know of no such way to set up a rule :( – Eli Greenberg Apr 1 '12 at 22:05
Ah, I see. Perhaps another site on the stack exchange network would be more useful. – sarnold Apr 1 '12 at 22:24
Ok, I apologize. I'm new to Stackexchange so I'm still getting used to everything. Thanks for your help. – Eli Greenberg Apr 1 '12 at 22:29
You might want to look into Thunderbird extension development. What you want to do is definitely possible though. It might be a little more work than VBA scripting in Outlook, but on the bright side, you can use JS instead of VBA, and you'll be able to develop Firefox extensions too by the time you're done. =P – Lèse majesté Apr 1 '12 at 22:41

In your Mail Application, create a Rule (Preferences » Rules) which executes AppleScript if the subject matches.

If you want to do it in terminal, look into "procmail" and possibly "fetchmail".

share|improve this answer
Thunderbird has AppleScript integration? – slhck Apr 2 '12 at 9:26

Your Answer


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.