Jim Osborn asked,
| LOG=`formail -XFrom:`
| Thing is, there's no linefeed at the end of the LOG line ...
Right. If there were, you couldn't get to put more than one LOG= assignment
on the same line when you want to.
| I've tried the obvious (to me),
| adding a "\n", enclosing the formail bit in "echo", adding
| another dummy LOG=`echo ""`, all to no avail.
Backquote assignments in sh, and in procmail by imitation, strip a final
newline.
| What's the secret?
There are two basic approaches. One is to include the closing newline
literally (note the closing quotation mark on the next line):
LOG="`formail -XFrom:`
"
The other is to store a newline in a variable early in the rcfile, thus:
NL="
"
and thereafter to include that variable in LOG assignments:
LOG="`formail -XFrom:`$NL"