procmail
[Top] [All Lists]

Re: Why does this rule work? - part 2

1999-06-10 05:18:50
Walter Dnes:
 |> What piece of knowledge am I missing here?
 |  2 items...
 |  1) The "delivery" is to formail, which spits output to stdout; it
 |does *NOT* launch a another email.  Without the "f" flag, the message
 |would disappear into /dev/null
 |  2) The "f" (filter) flag in the "delivery" action says to deliver
 |the headers or body or both ("h" or "b" or default) to formail; let
 |formail do its thing; then return the modified text back to procmail
 |and continue processing.

Thanks to all who replied.  I realized formail != procmail, but mistakenly
thought the formail output would be passed to another procmail.

That explains why there wasn't an infinite respawn of procmails with this
rule, but I don't completely understand how my message made it to the
dx.ml.new folder.  All messages will match the first rule, so the second
rule (ELSE) shouldn't execute.  But it does.

    :0
    * ^Subject:[ ]+\/.*
    {
      subj = `echo "$MATCH" | sed -e 's/\[opendx-general\] //g'`

      :0 fwh
      | formail -I "Subject: $subj"
    }

    :0: E
    dx.ml.new


I've removed the ELSE (E) and all seems to continue to work normally, but
I'm still interested in finding out why the ELSE didn't break the rule.  

FWIW, the complete rule (from the top level), was:

    :0 E
    * ^Sender: owner-opendx-general
    { 
      :0  
      * ^Subject:[ ]+\/.*
      {
        subj = `echo "$MATCH" | sed -e 's/\[opendx-general\] //g'`

        :0 fwh
        | formail -I "Subject: $subj"
      }

      :0: E
      dx.ml.new
    }

Randall

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