User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Shell Scripting section within the Software Development category of DaniWeb, a massive community of 391,548 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,566 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Shell Scripting advertiser:
Views: 1243 | Replies: 1
Reply
Join Date: Jan 2006
Posts: 2
Reputation: deft is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
deft deft is offline Offline
Newbie Poster

Question Parse emails for commands - cron? huh?

  #1  
Apr 29th, 2006
I need to do something I'm told that is relatively easy to do, but I can't find specific instructions on how to do it.

I need a way to look at incoming emails and run commands based on key words in them.

For example, incoming email:

Subject: Thing# 123
Body: delivered

when sent to dostuff@mydomain.com will run the command:

php -q ./app.php 123 setstatus="delivered"

...somebody mentioned something about cron and sendmail, blah blah. but I'm a noob, I need step-by-step help.

I'm using Apache on a remotely hosted account, I have SSH access.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2004
Location: VA, USA
Posts: 458
Reputation: TKS will become famous soon enough TKS will become famous soon enough 
Rep Power: 6
Solved Threads: 17
TKS's Avatar
TKS TKS is offline Offline
Posting Pro in Training

Re: Parse emails for commands - cron? huh?

  #2  
May 8th, 2006
Rewrite rules for sendmail are what you're looking for:
http://www.faqs.org/docs/linux_network/x14923.html

Then use this link to help you with cron...or use a X frontend for cron:
http://www.tldp.org/HOWTO/Mail-Queue-4.html

For using Cron in XWindows (KDE mainly), see my blog:
http://linux-blog.org/index.php?/arc...ase-Kcron.html
My Home Away from Home: Yet Another Linux Blog
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Shell Scripting Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Shell Scripting Forum

All times are GMT -4. The time now is 9:08 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC