MATCH variable usage in log files
Don <[email protected]> Wed, 19 Mar 2003 12:14:01 -0400
| Newsgroups | gmane.mail.procmail.devel |
|---|---|
| Message-ID | <[email protected]> |
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)=20 If I leave VERBOSE=3Dyes in my procmailrc, I get the match information I need, and I can parse the logs into a database, no problem.=20 Unless, of course, a bunch of mail comes in rapidly, in which case the log entries aren't always contiguous.=20 =46rom reading, I think intuitively that the using LOG variable and VERBOSE=3Dno is going to be the solution. (If I could cut down the sheer volume of the logfile, I think I'd experience less garbling)=20 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=3Dyes) 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