procmail
[Top] [All Lists]

Re: why did this match?

1997-10-21 00:06:25
On Mon, 20 Oct 1997 10:11:49 -0500 (CDT),
dattier(_at_)wwa(_dot_)com (David W. Tamkin) wrote:
Era Eriksson suggested to Timothy Luoma,
| Put the relevant parts of your .procmailrc in a new .rc file, save the
| offending message to a file, run it through the new .rc file with
| VERBOSE=yes, and take a deep breath.
Timothy knows which condition matched and which line in the head
matched it. What he needs to find out is which alternative in the
condition's regexp matched the line. A verbose log will tell him
only which condition matched, and that is something he already
knows.

I guess I didn't get the message across too well. My suggestion
amounts to isolating the matching recipe, and running the message with
a verbose log to see what happens when you +edit+ the recipe. That
way, you can easily isolate the part that actually matched.

A good algorithm to apply is binary search: trim away half the
potentially matching recipes and try a run on the message again. Now
you know in which half of the file the match occurred (if it doesn't
match, it was in the half you deleted. Put it back). Reapply
recursively.

(Of course, a couple of well-chosen LOG= statements can sometimes save
you a lot of work.)

/* era */

-- 
 Paparazzi of the Net: No matter what you do to protect your privacy,
  they'll hunt you down and spam you. <http://www.iki.fi/~era/spam/>

<Prev in Thread] Current Thread [Next in Thread>