General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old September 13th, 2002, 02:56 PM
crazytrain81 crazytrain81 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 232 crazytrain81 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
triggering script execution from outside a script...

Specifically, I need to see if there is a way to trigger a script or program to run whenever incoming mail is recieved by the server (any unix mail daemon..). the intent is to write a server side filter that allows users to enter the addresses they want to allow through, and it can't be strictly web based because many users access mail through groupwise, which provides something a little less user friendly than what we're looking for.

Reply With Quote
  #2  
Old September 13th, 2002, 08:06 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
a cron comes into mind, but still your going to have to check the mail at regular intervals, like every 5 min, i dont think there is a way for you to excute a script when mail comes it???

Reply With Quote
  #3  
Old September 13th, 2002, 09:51 PM
mytch mytch is offline
Dev Articles Novice (500 - 999 posts)
 
Join Date: Apr 2002
Location: Sydney, Australia
Posts: 589 mytch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Hmmm. I would Cron every 1-2 minutes on the same PC as the mail server. Use our PHP and IMAP tutorial to get you started on checking the inbox periodically. PHP's IMAP functions are extremely powerful and there's every function you'll need in there to perform the task that you're trying to perform.

Hope this helps

Reply With Quote
  #4  
Old September 13th, 2002, 11:12 PM
Crowe Crowe is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Huntsille, AL
Posts: 14 Crowe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Crowe Send a message via AIM to Crowe
Lightbulb

You could really put a hurtin on a server running stuff so often Depending how busy it was.

Or, you could be sly, and just create a mail alias that out puts to a script. An alias file might look like this, depending on your system.


Quote:
myemail@mydomain.com: "|/path/to/my/script.php"


You'd have to have php installed as cgi.. OR try my handy alternative if your on a linux box...



Now, it only triggers when you get email to that address.

Reply With Quote
  #5  
Old September 16th, 2002, 08:50 AM
crazytrain81 crazytrain81 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 232 crazytrain81 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
slight change

Turns out it's a Netware server, the people who mentioned the project to me said it was Unix but were apparently ignorant of the Netware software running on every computer in the place.

SO same question different server. any ideas?

Reply With Quote
  #6  
Old September 16th, 2002, 08:57 AM
Crowe Crowe is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Huntsille, AL
Posts: 14 Crowe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Crowe Send a message via AIM to Crowe
Same answer - IF they still use sendmail for mail. Netscape server runs on unix/linux, if I'm not mistaken. Of course, I'm pretty sure they also have their own mail solution.

Most likely there is a way to do this with Netscape's mail server too. This is they way *most* mailing lists work, by sending the email through a pipe to a program. Majordomo comes to mind.

Sorry I don't have more specific help with Netscape, I've never done it in that enviornment.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > triggering script execution from outside a script...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT