procmail
[Top] [All Lists]

Re: Adding Lines: header

2003-06-03 18:16:19
Ricky Buchanan wrote:

This is me

It is?  Are you sure?

> ...  wondering how a recipe I cargo-culted from here ages ago
actually works.    The recipe is to add a lines: header if the msg is
missing one.  Here it is:

but originally I wrote,

:0
* ! ^Lines:
{
  :0B
  * 1^1 ^.*$
  { }
  LINES = $=

  :0 fhw
  | formail -a "Lines: $LINES"
}

Oh yes, Buchanan, mark my birthday by throwing my youthful indiscretions in my face. It may not be the same date in Oz any more, but it still is where I live.

  * 1^1 ^.*$
>   # ?? Something to do with scoring any line?

Score +1 for each line in the body.

  { }
>   # ?? Something to do with an empty sub recipe?

Do nothing as the action of that recipe. The only purpose of the recipe is to calculate a score, so whatever the score comes to be, do nothing.

  LINES = $=
>   # ?? Set Lines variable to ...  something?

Set it to the score of the last recipe.

  :0 fhw
>   # Start sub-recipe, check headers, filter recipe, wait for filter

"H" is check head; "h" is process head.
Procmail always has to wait for filters, or else it couldn't collect the output; "w" says to wait for the filter's exit code.


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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