procmail
[Top] [All Lists]

Re: Setting different levels of Verbose logging

2002-06-10 14:57:22
At 12:20 2002-06-10 -0400, kandeb(_at_)spamcop(_dot_)net wrote:
Is there way to increment or decrement the amount of logging?  It

For example, non-verbose logging gives From line, Subject, and
the Folder (or disposition) that the incoming message took.  The

You can turn verbose on and off around specific recipes. You can also manually emit LOG="something" lines where you want additional information:

LOG="From: $FROM$NL"

From line, in the case of email lists, usually contains the
listmail address.  However, I'd *like* to see what is usually
in the From: line - the originating sender.

Extract it, and emit it. I extract certain headers up top of my .procmailrc so that they're available to all my recipes within variables (saves me the hassle of extracting the common headers in lots of recipes):


#newline, for logging
NL="
"

# extract some commonly used headers into variables where we can make
# easy use of them.
:0
{
        :0
        * ^Subject:[    ]*\/[^  ].*
        {
                SUBJECT=$MATCH
        }

        :0
        * ^To:[         ]*\/[^  ].*
        {
                TO=$MATCH
        }

        :0
        * ^From:[       ]*\/[^  ].*
        {
                FROM=$MATCH
        }

        # Here we have to call shell.... -rt will parse return address
        # according to RFC rules.  Note we only process HEADER.
        :0 h
        SENDER=|$FORMAIL -rtzxTo:
}


BTW, I'm no longer on this list 
(procmail(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE),
so please respond to me and copy the list.

Hmm, that might explain why you're unaware of the above gem.

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