procmail
[Top] [All Lists]

Re: procmail log file corruption

2004-08-24 11:48:05
On Tue, Aug 24, 2004 at 11:25:12AM -0700, Bart Schaefer wrote:
On Mon, 23 Aug 2004 20:49:45 -0700 (PDT), Lloyd Lee-Lim
<ltleelim-procmail(_at_)limunltd(_dot_)com> wrote:

Here is my TRAP:

TRAP='abstract=`formail -l $LASTFOLDER`; date=`date`; lockfile -r 8 -l 1024 
$LOGFILE$LOCKEXT; echo "$abstract
  Filter: $filter$test
  Delivered: $date"; rm -f $LOGFILE$LOCKEXT'

I don't see where that actually writes anything to the logfile.  Looks
like it just echoes to standard output.  Knowing exactly when and how
the write to the logfile occurs is critical to diagnosing problems of
this sort.

Bart:

The "echo" in the TRAP will write output to the log.  Note last sentence
from procmailrc manpage excerpt:

      TRAP        When procmail terminates of its own accord and
                   not because it received a signal, it will exe­
                   cute the contents of this variable.  A copy of
                   the mail can be read from stdin.   Any  output
                   produced  by  this command will be appended to
                   $LOGFILE.  

-- 
dman

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail


<Prev in Thread] Current Thread [Next in Thread>