Using aliases to have an email trigger a php script

From: Date: Sat, 14 Jan 2006 16:55:20 +0000
Subject: Using aliases to have an email trigger a php script
Groups: php.general 
Request: Send a blank email to php-general+get-228618@lists.php.net to get a copy of this message
Hello, I'd like an email received to toronto@washroomquest.com to trigger a php script. I've configured the following: in /etc/aliases toronto: |/var/www/wq/email_toronto.php in /etc/exim/exim.conf system_aliases: driver = aliasfile file_transport = address_file pipe_transport = address_pipe file = /etc/aliases search_type = lsearch user = mail in /var/www/wq/email_toronto.php #!/usr/bin/php -q <? $var_toronto_file = fopen("toronto.txt", "a"); fwrite($var_toronto_file, "Email Received!\n"); fclose($var_toronto_file); ?> I then send an email to toronto@washroomquest.com and check the file toronto.txt but it does not say Email Received! The exim log shows: 2006-01-13 13:38:12 1ExToS-0007Ni-00 <= sean@yip.org H=mailout2.igs.net [216.58.97.88] P=esmtp S=758 id=43C7F38C.7000006@yip.org 2006-01-13 13:38:12 1ExToS-0007Ni-00 => |/var/www/wq/email_toronto.php <toronto@washroomquest.com> D=system_aliases T=address_pipe 2006-01-13 13:38:12 1ExToS-0007Ni-00 Completed There's nothing in the panic log or syslog. A few things I've tried: * changed the permissions to 777 in toronto.txt and email_toronto.php to rule out a permissions issue * changed in systems_aliases user=root * put the script in /etc/smrsh (even though I don't think I'm running smrsh on my server) Any idea as to why my script isn't being triggered by the email? Any further logs I can check? Thanks, Sean

« previous php.general (#228618) next »