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

So I'm setting up a raspberry pi at home to automate some tasks. I'd like it to run a terminal command when it receives an email.

Not sure exactly how to go about doing this.

Ideally I'd also like it to filter only messages from certain email addresses too. The command would most likely be in the subject line of the email.

Running Debian it's always on via ethernet.

Thanks guys

share|improve this question
I haven't tried much TBH, but I've installed dovecot and postfix – Dhruv Govil Aug 15 '12 at 16:25
Are you planning to connect your Raspberry Pi global network and setup MX record? Or, are you polling a remote POP/IMAP server from Raspberry Pi? BTW, we have in public beta. – Yasushi Shoji Aug 18 '12 at 19:22
up vote 1 down vote accepted

Create a pipe alias in your MTA and then have the script parse the email from stdin.

share|improve this answer
Thanks I will try that. – Dhruv Govil Aug 15 '12 at 16:30

You must log in to answer this question.

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