954,515 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Parse emails for commands - cron? huh?

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 [email]dostuff@mydomain.com[/email] 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.

deft
Newbie Poster
2 posts since Jan 2006
Reputation Points: 10
Solved Threads: 0
 

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?/archives/112-Schedule-Tasks-in-Linux-with-Ease-Kcron.html

TKS
Posting Pro in Training
470 posts since Jan 2004
Reputation Points: 108
Solved Threads: 18
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You