procmail
[Top] [All Lists]

confused - want to use mysql database

2000-06-28 18:00:15
I think I have a pretty good start on this, but I'm a little confused about
the procmail part to make this work... Any assistance / pointers would be
greatly appreciated.

I'm trying to insert the subject and body of messages sent to particular
email addresses into a mysql table, for later processing... I also want the
message to be delivered to where it was originally sent to as well...
Procmail is set up for global filtering on the server in the sendmail
config.  No matter what I do, I seem to be getting an error with the
executing of the perl script being skipped...

What I want to do is have any email addressed to an address like this
*editor(_at_)domain(_dot_)com     (could be biz-editor or sportseditor, etc..)
have procmail catch this and then insert just the subject and the plain
text body of the message (no attachment or anything else), into a mysql
table...  It would be really nice to also capture what the wildcard part of
the name was too, but I can live without that for now.

What I have done is this
in my /etc/procmailrc file I have this

VERBOSE=yes
LOGFILE=/etc/procmail/procmail.log
...
a bunch of INCLUDERC files here
.. 
INCLUDERC=$PMDIR/rc.editors-pr

then I have an rc file in my /etc/procmail/.procmail subdirectory called
rc.editors-pr which has this in it

:0
* ^(To|Cc|Bcc): (_dot_)*editor(_at_)domain(_dot_)com
{ 
  :0bc:
  SUBJECT=`formail -zxSubject`
  BODY=`formail -I ""`
  | /www/cgi-bin/parse_editor_mail.cgi -s "$SUBJECT" -s "$BODY" >>output4
}

I was trying to follow the info in this post
http://www.xray.mpe.mpg.de/mailing-lists/procmail/1999-07/msg00065.html

Here is the end of error message I get when I turn on verbose debugging for
this specific recipe (all the others before it are processed fine)

procmail: Assigning "INCLUDERC=/etc/procmail/rc.editors-pr"
procmail: Match on "^(To|Cc|Bcc): (_dot_)*editor(_at_)domain(_dot_)com"
procmail: Executing "formail,-zxSubject"
procmail: Locking "SUBJECT=whats.lock"
procmail: Skipped "up cool dude"
procmail: Assigning "LASTFOLDER=SUBJECT=whats"
procmail: Opening "SUBJECT=whats"
procmail: Acquiring kernel-lock
procmail: Unlocking "SUBJECT=whats.lock"
procmail: Executing "formail,-I,"
procmail: Assigning "BODY=
did this work"
procmail: Skipped "| /www/cgi-bin/parse_editor_mail.cgi -s "$SUBJECT" -s
"$BODY" >>output4"
procmail: Locking "/var/mail/jerry.lock"
procmail: Assigning "LASTFOLDER=/var/mail/jerry"
procmail: Opening "/var/mail/jerry"
procmail: Acquiring kernel-lock
procmail: Unlocking "/var/mail/jerry.lock"
From preeper(_at_)cts(_dot_)com  Wed Jun 28 17:44:41 2000
 Subject: whats up cool dude
  Folder: /var/mail/jerry
647
procmail: Notified comsat: "jerry(_at_)7321:/var/mail/jerry"


The message isn't getting processed into the mysql database... And it looks
like it's not even capturing the whole subject for sure because of the
skipped line with everything in the subject after the first word... and the
skipped line that points to the perl program.

Now I'm lost.  Can anyone help?

Jerry




_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>