procmail
[Top] [All Lists]

Re: Get extra arguments from subject line

1998-11-17 04:17:14
On Tue, 17 Nov 1998 18:44:15 +0800 (JST),
"Francis A. Vidal" <francis(_at_)usls(_dot_)edu> wrote:
  FILE="$MATCH" + ".txt"
  :0 ah
  | cat - ./$FILE 2>&1 | $SENDMAIL -oi -t
the problem is: procmail ignores additional parameters other than "$MATCH"
in the FILE line. how do i add a suffix (i.e. '.txt') with the matched
number?

You want FILE="$MATCH.txt"

... or do you mean, how do you get a .txt suffix into MATCH from the
Subject? 

    * ^Subject:[        ]*get\<+assign\<+\/[0-9]+(\.txt)?

will allow an optional .txt after the numbers and grab the whole
expression into MATCH. (If that's not what you want, don't do it :-)

* ^Subject:.*get assign \/[0-9]+
* !X-Loop:(_dot_)*tambok(_at_)usls(_dot_)edu
{
  MAILDIR=$HOME/assign
  :0 fhw
  * ^Subject:.*get assign \/[0-9]([0-9])?

This condition is superfluous, BTW; you already grabbed the file name
above. 

/* era */

-- 
.obBotBait: It shouldn't even matter whether    <http://www.iki.fi/~era/>
I am a resident of the state of Washington. <http://members.xoom.com/procmail/>