procmail
[Top] [All Lists]

two questions - using perl script

2000-07-09 21:54:40
Hi all,

I have made a good deal of progress so far in getting procmail to pass some
of the mail info to a perl script that inserts the info into a mysql
database.  But now I have two problems I can't seem to figure out (and I
can't get through to the archive of the mailing list).

1. Is there any way I can catch the to address I'm trying to match on.
Here is my recipe that I'm using

:0
* ^TO_()(_dot_)*editor(_at_)cts(_dot_)com
{
  SUBJECT=`formail -zxSubject`
  BODY=`formail -I ""`

  :0bc:
  | /www/cgi-bin/parse_editor_mail.cgi "$SUBJECT" "$BODY"
}

I tried changing the recipe to this

:0
* ^TO_()(_dot_)*editor(_at_)cts(_dot_)com
{
  TO=$MATCH
  SUBJECT=`formail -zxSubject`
  BODY=`formail -I ""`

  :0bc:
  | /www/cgi-bin/parse_editor_mail.cgi "$SUBJECT" "$BODY" "$TO"
}

and adjusting the perl script for the insert, but that didn't work either.
And the email can be one of a bunch of different ones and can appear in the
to or cc or bcc, which I don't have control over.

2. If I pass a large email to it, I get this error message
procmail: Excessive output quenched from "formail"
procmail: Exceeded LINEBUF

I tried adding LINEBUF=4096 to my procmailrc file right before the include,
but it didn't help so I increased it to 8196 which then let it pass
through.  I finally set it at 16384 and set right before the recipe for
this particular condition, to catch large emails.  I was wondering what the
consequences are of leaving this set this high.

Thanks for any help someone can provide.

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>
  • two questions - using perl script, Jerry Preeper <=