Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
    
What have you tried so far? What MTA are you using? –  shufler Aug 14 '12 at 17:45
    
I haven't tried much TBH, but I've installed dovecot and postfix –  Dhruv Govil Aug 15 '12 at 16:25
1  
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 raspberrypi.stackexchange.com in public beta. –  Yasushi Shoji Aug 18 '12 at 19:22

1 Answer 1

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

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.