|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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.
|
|
#2
|
|||
|
|||
|
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???
|
|
#3
|
|||
|
|||
|
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 ![]() |
|
#4
|
||||
|
||||
|
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:
You'd have to have php installed as cgi.. OR try my handy alternative if your on a linux box... Quote:
Now, it only triggers when you get email to that address. |
|
#5
|
|||
|
|||
|
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? |
|
#6
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > triggering script execution from outside a script... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|