procmail
[Top] [All Lists]

MATCH variable usage in log files

2003-03-19 15:28:18
(
I posted this to the wrong list initially... this is a repost.
Thanks again, Dallman for your help
)

Hi!

I'm a new list subscriber and despite a great deal of reading in the
archives, I've been unable to find any reference to the problem I'm
having at the moment.

I'll try to be brief... I'm using a MySQL database and a small perl
program to generate /etc/procmailrc... it works just fine, and I've
set it up as a cron job so changes to the database are reflected in
procmailrc on a timely basis.

I also wrote a couple of awk scripts that take my /var/log/maillog and
my procmail logs and feed them to MySQL as well. The idea was to build
a comprehensive evaluation tool... and they work pretty good.

Then I wrote some php scripts so I could search and sort through the
logs to evaluate the performance of my recipes using a web interface.
The object is to get rid of spam, of course... and it generally works
very well.

Here's my problem: I want to be able to evaluate exactly which recipes
are doing the work. (I've assembled a couple hundred key words and
phrases which I want to catch) 

If I leave VERBOSE=yes in my procmailrc, I get the match information I
need, and I can parse the logs into a database, no problem. 

Unless, of course, a bunch of mail comes in rapidly, in which case the
log entries aren't always contiguous. 

From reading, I think intuitively that the using LOG variable and
VERBOSE=no is going to be the solution. (If I could cut down the sheer
volume of the logfile, I think I'd experience less garbling) 

I've been reading the list contents, and I've learned that $MATCH
isn't any kind of special variable. I thought it was... and that I
could just print the contents into the log. Apparently I have to load
the LOG variable with the information I want to log... and I seem to
be unable to figure out how to get the recipe match information (i.e.
that ONE LINE out of all that info that appears when VERBOSE=yes) into
it.

Would someone be so kind as to point me in the direction of the
appropriate docs... or otherwise assist?

Don

P.S. oh yeah... procmail v3.15.2, linux slackware 8.1, kernel 2.4.18


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