SUMMARY:How to call a script function when mail server receive an email

From: Alexander Surbakti <alex_at_indo.com>
Date: Mon Jan 17 2005 - 21:14:05 EST
dear all,

several days ago i sent this topic to this mailing list and i just 
solved it yesterday night.
most of what i have done is like what disastermaster was told. i have a 
perl file named callscript.pl that needed to be run when our mail server 
get an email from a certain address, at this case the address i use is 
alex@localhost. all the step that i have done is:

shell>vi /etc/aliases
   #make some editing
     alex :    "|/etc/smrsh/callsript.pl"      
   #this is what disastermaster forgot to tell me that the perl file 
must be placed at /etc/smrsh
shell>newaliases

and then i write mail to alex@localhost.  when i check at 
/var/spool/mail_log i found that stat=sent.  it  verified with the  
increament of rows number in my  mysql table  since the callscript.pl  
written  with insert data  function.

earlier the callscript.pl i placed at /var/www/cgi-bin which caused 
stat=service unavailable.

have a nice day,
cheers,
-alex-
Received on Mon Jan 17 21:05:11 2005

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:42 EST