David's example using TRAP, prompted me to reconsider a problem that
had been bugging me for a while, but not badly enough to fix it.
Given the following:
NL="
"
LOGABSTRACT=yes
FROM=`formail -rx To: | sed -e 's/^[ ]*//'`
REALLY_FROM=`formail -x From: | sed -e 's/^[ ]*//'`
LOG="REALLY FROM: $REALLY_FROM$NL"
I usually see output like the following in the log:
REALLY FROM: Gary Funck <gary(_at_)intrepid(_dot_)com>
From procmail-bounces(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE Sun Dec 28
19:40:36 2003
Subject: RE: rotate mailbox based on size?
Folder: procmail-mail
4928
REALLY FROM: Andre Hedrick <andre(_at_)linux-ide(_dot_)org>
From
linux-kernel-owner+gary=40intrepid(_dot_)com(_at_)vger(_dot_)kernel(_dot_)org
Sun Dec 28
19:41:51 2003
Subject: Re: ide: "lost interrupt" with 2.6.0
Folder: linux-kernel-mail 5016
but since there's no locking discipline in place, the REALLY FROM lines can
easily get jumbled in the output, like this:
REALLY FROM: Gary Funck <gary(_at_)intrepid(_dot_)com>
REALLY FROM: Andre Hedrick <andre(_at_)linux-ide(_dot_)org>
From procmail-bounces(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE Sun Dec 28
19:40:36 2003
Subject: RE: rotate mailbox based on size?
Folder: procmail-mail
4928
From
linux-kernel-owner+gary=40intrepid(_dot_)com(_at_)vger(_dot_)kernel(_dot_)org
Sun Dec 28
19:41:51 2003
Subject: Re: ide: "lost interrupt" with 2.6.0
Folder: linux-kernel-mail 5016
I'd like the "really from" line to be next to the log abstract it is
associated
with. Perhaps TRAP would get me closer to the solution, but I'm wondering if
I'd
have to replicate the actions of LOGABSTRACT within the TRAP variable, or if
I can depend upon procmail to log the output from TRAP and the log abstract
in a single atomic operation?
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail