procmail
[Top] [All Lists]

Re: Extra information when logging

2003-02-11 05:17:57
At 11:32 2003-02-11 +0100, Cliff Sarginson wrote:

I have logging enabled on my procmailrc, but there is an extra piece of
information I want to log, I want one of the X-Headers in the message
logged as well. I tried verbose mode, but that was not interesting.
Is there anyway I can do this..my ability with procmail recipes is
marginal, I hunted around the usual places, but found nothing relevant.

LOG="something you want to dump into the logfile"

Hint: define $NL to be a newline (the log DOES NOT automatically add a newline).

NL="
"

then, you can:

LOG="whatever$NL"

instead of:

LOG="whatever
"


If you need an X-Header:

:0
* \/X-Header: .*
{
        LOG="$MATCH$NL"
}


LOG will emit regardless of whether you have VERBOSE set ot not (VERBOSE just logs matches and variable assignments - it would however, log the assignment of the $MATCH above).

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.


_______________________________________________
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>