procmail
[Top] [All Lists]

Why does this rule work?

1999-06-09 13:11:43
: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
}

------------------------------------------------------------------------------

I needed to clean "[ LISTNAME ]" references out of Subject lines for a
list, and adapted a rule from the list archives.

Question is, why does it work?  Once I'd tested it, found it worked, and
then looked at it more closely at it, I'm surprised it didn't put procmail
into an infinite respawn loop.

What exactly does the thread of execution look like here?

Here's what appears should happen: each time a list msg is received,
.forward invoked procmail, we come in and munge the subject, forking off a
copy to formail, which attempt redelivery, .forward invokes a second
procmail, ... etc.

But it works OK (no infinite respawn).  Subject is munged, and the message
appears in the =dx.ml.new folder, as I'd originally intended.

What piece of knowledge am I missing here?

Thanks,

Randall

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