procmail
[Top] [All Lists]

Re: Procmail question using {}

1995-11-29 18:07:02
You asked:

Do you have any examples using the curly braces in Procmail
version "v3.10 1994/10/31"? We don't seem to know the answer here at
Cadence. Maybe you folks can help?
 
 sure.  Lots of them.  Check out the procmailex man page.  

John's user said:
 
We want to automatically filter email and do multiple actions with it. 
We can do it using the "c" option (carbon copy to another filter recipe), 
but, we are trying to do it using just one filter recipe for maximum 
efficiency.

        Well, the way that _I_ would do it would be to:

        :0 Hc
        * ^Subject:.*test
        * ! ^Subject: *Re:
        | formail ....

          :0 Ac
          | formail ....

etc.
 
Apparently procmail will allow curly braces (man procmailrc, search for "}")
in the filtering recipe.

        Yup
 
Here is my test example which should reply to the sender with a
smiley-of-the-day twice:

#----------------------------------------------------------------------------
# This is what I am trying to get to work (two actions within one recipe):
: 2 w
^Subject:.*test.*
!Re:
{
|(formail -r ;echo "The smiley 1 of the day is";smiley) | $SENDMAIL -t
|(formail -r ;echo "The smiley 2 of the day is";smiley) | $SENDMAIL -t
}

        the problem that they are having is that they are thinking that the
braces deal with actions.  They do not.  They group recipes under
certain conditions.

Soren

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