virtual_odin Posted February 22, 2007 Share Posted February 22, 2007 My objective is to allow a list of people (email addresses) to send email from their usual email client, such that the server sends it on to another list of email addresses automatically. CWH build doesn't support the imap functions, so my first idea of a cron job on the mailbox using PHP's imap_open() etc won't work. The help desk advise that I could, at my own risk, use the Procmail filters to pipe mail to a script on the machine which would handle the email as it enters the system. However I am familiar with neither Perl nor Procmail. I have loaded Dada mail to help with this, but its "send from email" feature does not want to work. I have a call in to them. I have found .procmailrc and persuaded it to run a script that I have found. .procmail looks like this: INCLUDERC=/etc/ALAquota/overquotarc VERBOSE=on RECIP=$1 MAILDIR=$HOME/mydomain-mail LOGFILE=$HOME/mail.log INCLUDERC=$HOME/dada.rc INCLUDERC=.procmailrc and the file dada.rc looks like this: :0 * $RECIP ?? ^^list1@mydomain.com { :0 | /home/mydomain/www/cgi-bin/dada/plugins/dada_bridge.pl } ## where list1 is the address for the distribution list The log I get is: procmail: Assigning "INCLUDERC=/home/myroot/dada.rc" procmail: Match on "^^list1@mydomain.com" procmail: Assigning "LASTFOLDER=/home/myroot/www/cgi-bin/dada/plugins/dada_bridge.pl" procmail: Executing "/home/myroot/www/cgi-bin/dada/plugins/dada_bridge.pl" procmail: Notified comsat: "myroot@:/home/myroot/www/cgi-bin/dada/plugins/dada_bridge.pl" From someone@hotmail.co.uk Thu Feb 22 10:41:05 2007 Subject: test Folder: /home/myroot/www/cgi-bin/dada/plugins/dada_bridge.pl 1258 I am pretty sure something needs setting in mydomain.com/cgi-bin/dada/plugins/dada_bridge.pl or one of its supporting files, but when I try to load it I get a server (500) error. So my question is one of two. Either has anyone been here and fixed it? If so, how please?. Or has anyone another solution to suggest. As always grateful for any advice. Tim Quote Link to comment https://forums.phpfreaks.com/topic/39650-procmailperl-email-integration/ Share on other sites More sharing options...
effigy Posted February 26, 2007 Share Posted February 26, 2007 What errors do you see in your web server's (Apache) logs? Quote Link to comment https://forums.phpfreaks.com/topic/39650-procmailperl-email-integration/#findComment-194421 Share on other sites More sharing options...
virtual_odin Posted February 28, 2007 Author Share Posted February 28, 2007 If I am pulling out the right log, I get xx.xx.xxx.x - - [28/Feb/2007:01:24:04 -0500] "GET /cgi-bin/dada/plugins/dada_bridge.pl HTTP/1.1" 500 539 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2" Is that the log you mean? Quote Link to comment https://forums.phpfreaks.com/topic/39650-procmailperl-email-integration/#findComment-195832 Share on other sites More sharing options...
effigy Posted February 28, 2007 Share Posted February 28, 2007 I should have clarified. That's the access log; you want the error log. Look in your configuration for the ErrorLog directive to see where it's located. Quote Link to comment https://forums.phpfreaks.com/topic/39650-procmailperl-email-integration/#findComment-196131 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.