procmail
[Top] [All Lists]

Re: assignment as an action

1996-04-16 11:29:39
"Stefan Monnier" <stefan(_dot_)monnier(_at_)lia(_dot_)di(_dot_)epfl(_dot_)ch> 
writes:
      FOLDER=inbox

      :0
      * ^From: toto
      FOLDER=toto

      :0
      * ^From: tata
      FOLDER=foo

      ...

      :0
      | rcvstore +$FOLDER

but this doesn't work because after

      FOLDER=foo

the processing is stopped. I tried adding "c" in the options after the ":0",
but but it didn't really help because the assignment is then done in
another fork of computation and doesn't influence the subsequent rules.

Plain assignments are not allowed as actions.  Procmail interpretes the
above as attempts to save to the folders "FOLDER=toto", "FOLDER=foo", etc.
The solution is to turn the action into a nested block:

:0
* ^From: toto
{ FOLDER = toto }

Philip Guenther

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