Hi all Maybe I should be posting this on the Procmail list but someone here might have a non-Procmail solution. I'm trying to get a PHP script to process incoming email. The script will lookup a database and do something depending on the mail headers. I'm running on a FreeBSD virtual server account with sendmail as the mta. I've searched the archives and read numerous discussions about this but I'm not quite sure what my best option is.
Most suggestions say to use aliases or Procmail to pipe to PHP running in cgi mode. I'm trying to avoid that because I have PHP running very nicely as an Apache module and disk space is at a premium so I don't want to waste another 4 Mb or so on the cgi executable. Another idea is to send the mail to a pop mailbox and use PHP to poll the mailbox every five minutes or so. I can hit a PHP script from cron using wget. I'm not really thrilled with the idea of polling and the delay could put some users off. It seems that I could do with a way of writing a message to a unique file and then calling the PHP script with wget. The script can then read the file. I almost have this working with Procmail by using a maildir type mailbox but its back to front, I can only call PHP before the message is written to the file because Procmail stops once it is 'delivered'. I'd appreciate any suggestions or ideas. Thanks Ross __________________________________________________ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]