procmail
[Top] [All Lists]

Triggering activities through email

1997-06-18 15:58:00
     I am trying to do a few things.  I have read through a 
     number of FAQs and have been reading this list for a little. 
     I have set up procmail on a shell account.  It runs fine. 
     Filtering email into folders and stuff like that seems 
     pretty easy.  I am having trouble where it is not just 
     moving email around and piping it through commands.  The 
     procmail description says that it can be used to trigger 
     commands, but the syntax gets really obscure very quickly.  
     I will assume that this is a new procmailrc and that all 
     other mail will fall through to the inbox.  The following 
     messages can be sent to /dev/null after they are finished 
     running their jobs.  Is procmail even the right program to 
     use for these, or is there a better one?  This account I am 
     posting from has email only access which is why I want to be 
     able to set some of these up on my other account.
     
     1st:  I would like to send a email with a specific subject 
     like 'send news' and have it run a script file.  I already 
     have the script and it is currently running daily under a 
     cronjob and sending news updates.  If the cronjob dies, as 
     it seems to do occasionally, and I notice it, I would like 
     to have it run before I can get home and check the problem, 
     so all it would need to do is run $HOME/bin/new.sum.  Once 
     the script is running, it knows where to get stuff and send 
     it on its own.  I have tried some of the sample recipes for 
     autoresponders and file servers, but they assume the file is 
     already on your system and not being created at the time.
     
     2nd:  I would like to run another script that runs another 
     script called $HOME/bin/daily_weather.  I would like this 
     one to run the script and send the output to the address 
     that sent it.  Subject could be 'send weather'.
     
     3rd:  Since this account gets lots of junk email, and I 
     don't have access to nslookup, traceroute and whois, I would 
     like to be able to do this by email.  Can I send a email 
     with a subject 'whois 205.199.212.21' or 'traceroute 
     205.199.212.21' and have it send me the output of that 
     command.  It should only run these three commands.
     
     
     Reply privately if you don't think these are relevant to the 
     list.  I could also send a summary of the recipes that work 
     to the list after they have been tested out.  
     
     Thank you for your help, 
     Kerry Nice

<Prev in Thread] Current Thread [Next in Thread>