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