procmail
[Top] [All Lists]

Re: Get extra arguments from subject line

1998-11-12 18:24:01
On Thu, 12 Nov 1998, Edward J. Sabol wrote:

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...

thanks for the info and the correction as well. but if i wanted the format
of the <number> to be DDMMYYYY, would it be expressed in regex format as
this? 

        \/[1-3][0-9][0-1][0-9][0-9][0-9][0-9][0-9] 

---
u s l s N E T   university of st. la salle, bacolod city, philippines
. . . . . . .   PGP key available via e-mail / subject: get PGP key
francis vidal   tel. nos. (6334).435.2324 / 433.3526