On Mon, Dec 29, 2003 at 09:59:10PM -0800, Gary Funck wrote:
Here is the solution that I've come up with:
TRAP='formail -I "From " | formail -l "$LASTFOLDER"'
placed near the top of the procmailrc file, ahead of any delivery
The first formail invocation removes the leading "From " header and
the second one will add a new "From " header back, using the info from
the From: line, which is the REALLY_FROM address that I was logging
before, and this is the info. that the -l switch will use in its mail
summary. The message size logged in the message summary after the
folder name will be close but not necessarily the same as the size
of the actual delivered message, becuase the "From:" address may be
different than the "From " address in the message as delivered. Since
I don't use that size info. any way; I'm not worried about this small
source of inaccuracy.
It isn't efficient (it involves two executions of formail, and a new
shell(?), but it gives the output that I'm looking for.
I'm not sure, but what about using "-f fromwhom" in your call to procamil
in the first place?
From "man procmail":
Causes procmail to regenerate the leading `From '
line with fromwhom as the sender (instead of -f one
could use the alternate and obsolete -r). If
fromwhom consists merely of a single `-', then proc
mail will only update the timestamp on the `From '
line (if present, if not, it will generate a new
procmail mailing list