At 17:29 2000-03-20 +0100, Alessandro Bottoni wrote:
Does the "0" at the beginning of a recipe have a special meaning or is it
just a traditional name for a "generic" recipe (that is: "0" stands for
something like "my recipe")?
A digit in that position originally meant the number of rules to
follow. Recipe parsing was subsequently revised, and the digit didn't need
to specify the number of rules, and so the common convention is to specify '0'.
Can I use any other name in its place, like "Recipe"?
No. The line is used to specify flags - letters which define how the
recipe should take place - 'c' makes it run on a copy, 'e' only if the
immediatley preceeding recipe failed (this is the flag used for
'else/elseif' conditions), 'i' ignores write errors (if you have a
braindead app you're spawning).
Procmail is a linear script language - there's no subroutines or jump
operations, and therefore no need for labels (though there's no doubt in my
mind that would make it more versatile and easier to use). If you want
labels for your own use, just insert a comment above the recipe block:
#Recipe
:0
*somerule
!fwdaction
'man procmail' and the related man pages may be in order. 'man procmailrc'
lists the flags.
---
Please DO NOT carbon me on list replies. I'll get my copy from the list.
Sean B. Straw / Professional Software Engineering
Post Box 2395 / San Rafael, CA 94912-2395