procmail
[Top] [All Lists]

Re: env variables.

1997-05-15 01:25:00
On Wed, 14 May 1997 12:15:02 -0400 (EDT),
No One Special <psypher(_at_)voicenet(_dot_)com> wrote:
helo,

250-Informatik.RWTH-Aachen.DE Hello No One Special, ready to rock! :-)
250-EXPN
250-VERB
250 HELP

now, the above i've already managed to do, what i can't do is pick the 
^FROM line and place it on the command line to send the page out via
sendpage -p person from:$From variable {body}
any insight? has anyone else done this?

I'm not sure I follow here; at least, it would be nice to see what you
have already and work from that. 
  If I understand your question correctly, you want to copy whatever
is in the From: header and use that in the command line for sendpage.
  You want to put the body of the message you are forwarding on the
command line too, is this correct? (I'll assume for simplicity's sake
that it's not, and that the sendpage program can read its standard
input instead.)

    :0b
    * any conditions you want here ...
    * From:[    ]*\/[^  ].*
    | sendpage -p person from:"$MATCH" variable -

The hyphen here is supposed to mean to sendpage, read the contents of
the body from standard input. The stuff in the brackets consists of a
tab and a space, in order not to copy leading whitespace into the
MATCH variable. The \/ token tells procmail to copy into MATCH only
the trailing part of the matching expression (normally you'd get
everything the regular expression matched). 

Hope this helps,

/* era */

-- 
Defin-i-t-e-ly. Sep-a-r-a-te. Gram-m-a-r.  <http://www.iki.fi/~era/>
 * Enjoy receiving spam? Register at <http://www.iki.fi/~era/spam.html>

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