procmail
[Top] [All Lists]

Re: counting how often my rules hit with LOGFILE

2002-08-27 10:24:32
Thanks for all the help so far.  I'm getting closer.

What is the $MATCH in your rule, Udi?  It seems to expand to "" for me.
Also, I was hoping to avoid having the create individual logging means for
each rule (I have about 100).

BTW, I apologize for not mentioning my version before.  I'm running
"procmail v3.22 2001/09/10"

Fuzzy
-- 
Quidquid Latine dictum sit, altum videtur.
Si hoc legere scis, nimium eruditionis habes.
Vir sapit qui pauca loquitur.
Cras amet qui numquam amavit, quique amavit cras plus amet.
Uno itinere non potest perveniri ad tam grande secretum.

On Tue, 27 Aug 2002, Udi Mottelo wrote:

On Tue, 27 Aug 2002, Fuzzy Logic wrote:

Out of curiosity, I wanted to see how often each of my rules was used in
an average day, so I turned on VERBOSE and LOGFILE.  Now, I have a
question.  I searched the archives, but didn't find anyone who had asked a
similar question.
[...]
My question is this:  Is there a way to ask procmail to just tell me a hit
and not all the misses (ie, not use VERBOSE, but still get the "Match on"
line)?

      I do not kno this flag but, you can LOG your matches in this way:

LOGABSTRACT=no
VERBOSE=no
:0 ...
* Does it match my string?
{
LOG="Found:$MATCH
"
      :0
      The action
}


      To account the matches:

awk -F":" '/Found/ {x[$2]+=1}; END {for(i in x) print i,x[i]}' lgofile

      Will give you table of all matches and counters.

Bye,
 Udi





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