procmail
[Top] [All Lists]

problem with double $MATCH

2006-05-10 04:36:34
Sorry.. i post the same question again.

According to Ruud H.G. van Tol advice, i've change my .procmailrc like this:

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

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

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

:0
* ^Subject: getresult stuid $STUID passid $PASSID 
| echo "use TEST; SELECT * FROM login WHERE id_student \
in ( SELECT id_student from login where id_student = $STUID AND passwd = 
$PASSID )" | /usr/local/mysql/bin/mysql -t -n > $HOME/mail/"result.txt" ; 
(formail -r ; cat "result.txt") | $SENDMAIL -oi -t ; rm -r "result.txt"


But, i've got no reply, this is my procmail log:

procmail: Skipped "$STUID = "$MATCH" }"
procmail: Skipped "$PASSID = "$MATCH" }"
procmail: Missing closing brace
From rizal(_at_)skripsi(_dot_)centurion(_dot_)org  Wed May 10 13:59:47 2006
 Subject: transkrip stuid 02018220 passid riesal
  Folder: /var/mail/admin                                                   776

The script above is my .procmailrc complete script, is my .procmailrc script 
wrong?, please help me with complete script if there anybody can do, iam so 
confuse with this..

NB:
about pipe command is not wrong, at least its work on my machine, those 
command would create a text file named result.txt from the query of database 
with tab based style. i've read mysql manual, and nothing wrong with it. so.. 
i think my .procmailrc script is wrong.

regards,


riesal


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