Paul Bartlett asked,
| I use procmail v3.10 (I'm stuck with it, folks) under SunOS 4.1.4.
| In my anti-spam recipes, I have a recipe, bitbucket.rc, which gets
| called in by multiple recipes with
|
| { INCLUDERC=$PMDIR/bitbucket.rc }
|
| as the recipe action line. Among other things, bitbucket.rc makes a
| log entry. Unfortunately, I have no ready way of determining which
| "outer" recipe called in bitbucket.rc, and this information would be
| useful. Is there some way I could set a variable, say, in the outer
| recipe which bitbucket.rc could use when it makes its log entry? Or
| some other technique for identifying the calling recipe?
Easy enough. Every time you include $PMDIR/bitbucket.rc, do it this way:
:0 flags
* conditions
{ REASON="whatever is undesirable about mail that this recipe catches"
INCLUDERC=$PMDIR/bitbucket.rc }
Then in the includerc itself, start out like this (note the trailing quote
at the left margin of the second line):
LOG="This message is getting bitbucketed because $REASON.
"