procmail
[Top] [All Lists]

Re: recipe problem

1998-10-07 07:47:41
| 19-00-00 era eriksson <era(_at_)iki(_dot_)fi> list.procmail
| 
|     :0
|     * ^Sender:(.*\<)?\/porschelist
|     {
|         LOG="$MATCH
| "
|         :0:
|         porsche
|     }
| 

You may find interesting chapter 10.8 "How to run an extra shell command as
a side effect? from pm-tips.txt. I use separate biff log to tell me about
important messages. One note: the $biff file is not locked so the
"echo" order in the file may not exatly right if you get lot of messages.
(In practise that's only a marginal problem)

          ...When I was dropping a message to a folder, I wanted to send a
          message to my biff log too. The idea is that the drop-conditions
          have already matched and then we run extra command by using side
          effect of "?" token. As far as the recipe is concerned, the "?"
          is a no-op. The pedantic way would have been to add the LOCKFILE
          around to the recipe, but imagine 50 similar recipes like
          this...and you understand why the LOCKFILE was left out. It's
          only necessary if you worry about sequential writing to the biff
          file.

            :0 :
            * drop-condition
            * ? echo message: $FROM $SUBJECT >> $biff
            $MBOX

jari

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