Fuzzy, there is a weak point in my suggestion: if you set
LOG per condition you will get very very long filerc. Also
what are you going to do with multi conditions:
:0
* one string
* two strings
* maybe more?
{
LOG="What to write here?"
...
I suggest to back to the good old VERBOSE but use score:
:0
* 1^0 first
* 1^0 next
* 1^0 and more
action
Now you can grep from the logfile. I would do something like:
sed -n '/procmail: Score: [1-9]/s/^[^"]*"//p' |
awk '{x[$0]+=1}; END {for(i in x){print i, x[i]}' |
sort -n
Bye
Udi
On Tue, 27 Aug 2002, Fuzzy Logic wrote:
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).
[...]
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
--
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail