Re: logging Date, From To and CC?

Robert Bonomi <[email protected]>
Newsgroups gmane.mail.procmail
Message-ID <[email protected]>
> Subject: Re: logging Date, From To and CC?
> Date: Fri, 14 Sep 2012 07:48:02 -0500
> From: [email protected]
>
>  > > Does anyone have a recipe (patch?) for logging Date From To and CC
>  > > when LOGABSTRACT is set??
>   

[ sneck -- original recipe details ]

>
> Hum.  That makes me wonder: how does one log the matching rule??
 
To do -that-, you either assign a 'name' to the recipe, and log the name,
e.g. 

    :0  # recipe foobar
    * {whatever}
    {  LOG="** Recipe: foobar ${NL}"
       ... {as above]

or you explicitly write the rule(s) twice, as in
    :0
    * {whatever no 1}
    * {whatever no 2}
    * {whatever no 3}
    {  LOG="** Match on: {whatever no 1} ${NL}"
       LOG="** Match on: {whatever no 2} ${NL}"
       LOG="** Match on: {whatever no 3} ${NL}"
       ... {as above]
    
Approach #2 has the disadvantange that you have to update the rule
in two places to maintain "consistency" between what is actually 
being tested, and what is being reported.
Depending on your needs, it might be simpler to simply set
the VERBOSE variable to yes, or 1.  this will auto-log _all_
rule matches, *non* matches, variable substitutions, etc.
'Noisy', but shows exactly what's going on, at every step.

BTW, if it wasn't  obvious. all this works *without* LOGABSTRACT being set.
If you want the logging _only_if_ LOGABSTRACT is set, then bracket the 
group of LOG= lines with
  :0
  * LOGABSTRACT ?? (1|yes|true)
    {
       [[ LOG= lines go here ]]
    }


Note well that the variable name before the '??' does *NOT* have  $ in front
of it.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.