procmail
[Top] [All Lists]

Re: problem with double $MATCH

2006-05-08 13:38:43
si-riesal schreef:

--.procmailrc file--
MAILDIR=$HOME/mail
LOGFILE=$HOME/mail/log

Make that:

  MAILDIR = "$HOME/mail"
  LOGFILE = "$MAILDIR/log"



:0
* ^Subject: getresult stuid \/[^ ]* passid \/[^ ]*
| echo "USE TEST; SELECT student_id FROM TEST WHERE student_id=$MATCH"
  and passid=$MATCH | /usr/local/mysql/bin/mysql -t  >
$HOME/mail/result.txt | formail -rA "X-Loop: admin(_at_)centurion(_dot_)org" |
cat - result.txt 2>&1) | $SENDMAIL -oi -t

You should move the dquote ("), that is after the first $MATCH, to
behind the second $MATCH.




mail-v admin(_at_)centurion(_dot_)org
Subject: getresult stuid ISITTRUE passid IAMNOTSURE

   :0
   * ^Subject: getresult stuid \/[^ ]+
   { $STUID = "$MATCH" }

   :0
   * ^Subject: getresult stuid $\STUID passid \/[^ ]+
   { $PASSID = "$MATCH" }

and then use those two variables instead of the 2x $MATCH.

-- 
Groet, Ruud


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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