procmail
[Top] [All Lists]

$MATCH being called incorrectly?

2003-04-08 18:59:12
Hi all,

I have a recipe that takes an incoming message with a varible followed by
a 'secret' string of characters [which always stays the same]. The varible
[first part of subject:] is to be used as an argument of sorts - it
becomes part of the filename of the body of the message. The recipe
extracts the body of the message out into a file, and then it is supposed
to run a couple of programs that also use that varible.

Saving the file properly is no problem. But when I add the other two
programs to the recipe, it chokes. Here's the recipe:

:0bDfw
* ^Subject:[   ]*[^    ]+[     ]+super dupper secret text
* ^Subject:[   ]*\/[^  ]+
| cat > $HOME/dump_dir/$MATCH-file.txt \
; $DBACCESS informix1 < $HOME/dump_dir/$MATCH-file.txt \
; $FORMAIL -I"From:vjl(_at_)vjl(_dot_)org" 
-I"To:vjl(_at_)crichton(_dot_)vjl(_dot_)org" \
-I"Subject: your $MATCH test job is done" | $SENDMAIL -oi -t -f \
vjl(_at_)vjl(_dot_)org

As it stands above, the recipe won't work. If I comment out the $DBACCESS
and $FORMAIL lines, it extracts the body of the message into the correct
directory with the proper name [in this case, $MATCH equals something like
"Z03", w/o the quotes].

Both $DBACCESS and $FORMAIL are vars that expand to program names.
"informix1" is a hardcoded argument that $DBACCESS takes.

I'm using: procmail v3.10 1994/10/31 and I have no way of upgrading [it's
on another's system], nor can I install a newer version.

I'm certain I'm calling $MATCH incorrectly - can someone point me to the
error of my ways?

Much appreciated,

/vjl/




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