Yes, to my surprise `B' and `HB' flags on the colon line *do* affect exit
code ("?") conditions, which, like regexp conditions, assume `H' if the
colon line is noncommital. I took an mbox that contained one message, found
a word in the body that wasn't in the head and a word in the head that
wasn't in the body, and ran it through this:
DEFAULT=/dev/null
VERBOSE=on
:0
* 1^0 ? grep headword
* 1^0 ? grep bodyword
{ }
:0HB
* 1^0 ? grep headword
* 1^0 ? grep bodyword
{ }
:0H
* 1^0 ? grep headword
* 1^0 ? grep bodyword
{ }
:0B
* 1^0 ? grep headword
* 1^0 ? grep bodyword
{ }
HOST
The weights were there so that, when grep failed to find the headword,
procmail would still try to grep for the bodyword and not abort the recipe.
Result: just as for regexps, `H' (or having neither `H' nor `B') lead to
finding the headword but not the bodyword, `B' to finding the bodyword but
not the headword, `HB' to finding both.
I wonder how many exit code conditions there are in my rcfiles that are
broken because I assumed that the command would read the entire message, and
why none of them have ever caused trouble.
DWT
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail