procmail
[Top] [All Lists]

Re: Procmail log intelligibility

2002-05-31 08:35:42
Bart corrected himself,

| I neglected to remove the temporary log file.  Something like
|
| TRAP="procmail -p DEFAULT=$REALLOGFILE /dev/null < $TEMPLOGFILE && \
| rm -f $TEMPLOGFILE"
|
| and if, after that, any temp logs are left behind, it means something went
| wrong when appending to the real log.

Another suggestion: use strong quotes rather than weak ones, so that the TRAP
will evaluate the variables when it executes and not when it is defined, just
in case, for some reason for certain messages, you change the value of
TEMPLOGFILE or REALLOGFILE along the way:

 TRAP='procmail -p DEFAULT=$REALLOGFILE /dev/null < $TEMPLOGFILE && \
 rm -f $TEMPLOGFILE'

All told, Bart, it is a brilliant idea.  The opening From_ line in the
logabstract and the desired trailing blank line make it perfect as input to
procmail.  Probably not necessary to use -p, though; I'd be concerned that
that would make the trap's procmail inherit the value of LOGFILE and start
appending to its own input.



_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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