procmail
[Top] [All Lists]

Re: Passing message body to a perl script

2001-05-10 02:49:43
On Wed, 09 May 2001, S M wrote:

I want to pass the entire message body to a perl
script from a procmail recipe.

Isn't this what the | is for, with the required flags? From the
procmailrc man page:

            | starts the specified program....You can optionally
              prepend this pipe symbol with  variable=, which
              will cause stdout of the program to be captured in
              the environment variable (procmail will not
              terminate processing the rcfile at this point).

That is, 
        :0
        * regex
        | perlscript.pl

The man page says by prepending it, like
        :0
        * regex
        scriptoutput=| perlscript.pl
(I don't know if spaces are important. They are with the
following recipe, if I remember) you cause output to be captured into 
$scriptoutput, but what is the difference between this and 
        :0
        * ^regex
        { scriptoutput=`perlscript.pl`
        }

-- 
Greg Matheson
Chinmin College,                 Do the right thing. 
Taiwan                           
_______________________________________________
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>