procmail
[Top] [All Lists]

Re: Why does this rule work? - part 2

1999-06-10 05:40:26
Randall Hopper asked:

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.  

Actually you don't have an "else" there: text after the colon
isn't treated as a flag, but as a name for the lockfile, so what
you're really telling procmail is to use a file "E" for locking
instead of determining a name itself (as it would with just
":0:"). For a real "else" you'd have to write ":0 E:", and that
would indeed prevent the messages from landing in that folder.

/HW

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