procmail
[Top] [All Lists]

Re: Get extra arguments from subject line

1998-11-12 12:21:07
Excerpts from mail: (12-Nov-98) Get extra arguments from subject line by 
Francis A Vidal
how do i get extra arguments from the subject like this:

:0
* ^Subject:.*get assign <number>

where <number> is the variable that i want to use in:

| (formail -r -A"X-Loop: my_email" ; cat $HOME/assign/<number>) \
$SENDMAIL -oi -t

You need to use the $MATCH facility available in procmail versions 3.10 or 
later.

:0
* ^Subject:.*get assign \/[0-9]+
| (formail -r -A"X-Loop: my_email" ; cat $HOME/assign/$MATCH) | $SENDMAIL -oi -t

By the way, you were missing a "|" before your $SENDMAIL...