procmail
[Top] [All Lists]

Re: Nesting and braces

1999-06-16 12:04:55
When Harry Putnam was puzzled by this,

|  >   :0 cb
|  >   * ^Subject: /ia/
|  >  /home/reader/spool/tmp.1
|  >  {
| <...>
|  > procmail: Skipped "{"

Era Eriksson answered,

| A lone brace without a "prelude" is a syntax error. You mean
| 
|     :0
|     * ^Subject: /ia/
|     {
|         :0cb:  # should probably +not+ omit the lock on this one
|         /home/reader/spool/tmp.1
| 
|         ... whatever else you had in the braces
|     }

Or this, equivalently:

      :0cb:
      * ^Subject: /ia/
      /home/reader/spool/tmp.1
      :0A
      {
          ... whatever else you had in the braces
      }

or if there was only one action inside the braces,

      :0cb:
      * ^Subject: /ia/
      /home/reader/spool/tmp.1
      :0A # and any requisite flags and a local lockfile if needed
      that_action_whatever_it_was


| To reiterate: There can be +exactly+ one action, and it can be
| +exactly+ one of
| 
|     deliver to a file
|     deliver to a pipe
|     forward
      a filter
      a variable capture
|     a set of braces with more recipes in them
                  ... with more recipes or assignments in them

| All but the last one are delivering and will need a c flag or
                  three
| something if you want to do additional actions further down in the rc
| file.

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