Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/39650-procmailperl-email-integration/
Share on other sites

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?

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.