views:

215

answers:

3

I am trying to write a series of scripts that will execute other scripts on my server depending upon text from an email that was just received. I am using mutt as a text based email client, but have no idea where to start for this. I am hoping to understand how this works more than just solving the problem, because this project of mine is for fun. Thanks!

A: 

Mailing list software does basically what you want. You can sign up or get removed to / from the mailing list by sending a special mails to the list manager. You can look at the open source mailman software to see how they do it and base your solution on a similar approach.

lothar
+3  A: 

Another option (which will possibly require more software and/or access, depending on your server setup) is to use procmail (or one of the similar software packages) to process your email, and run the text of the email as input into your server-side scripts.

Harper Shelby
A: 

the previous answer is correct and most probably the easiest.

There is another possibility. I assume that this mail account corresponds to a linux/unix user and this user has a home directory. At the home directory you can add a file called .forward and then you can forward all the incoming mail either to another address or pipe the incoming mail to a shell script. The .forward file -as far as I remember- should have execution permission as well as the shell script you are forwarding your email.

It works. I have done this in the past.

Luixv