thanks for the forward ;) I think the algorithm we now have in 3.2.0 works pretty well -- it imposes a minimal slowdown, which is the big problem with shortcircuiting. (With hundreds of rules, the naive shortcircuiting algorithm -- check after every rule fires -- turns out to be too slow.)
Also, we now expose a plugin API for shortcircuiting, so it's easy to implement new algorithms ;) --j. Kevin A. McGrail writes: > David is the author of MIMEDefang and I thought his email below on > short-circuiting deserved to be forwarded. > > Regards, > KAM > ----- Original Message ----- > From: "David F. Skoll" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, April 12, 2007 5:04 PM > Subject: Re: [Mimedefang] Memory Limit Variables? > > > > Mack wrote: > > > >> The -VE rules should be run before the +VE rules, i would have thought > >> tbh, > > > > Not necessarily. What if some of the negative rules are very expensive? > > The optimal order is a nightmare to figure out, but a first cut might go > > something like this: > > > > 1) Split the rules into positive- and negative-weighted sets. > > > > 2) Sort the rules by some combination of score and "cost of evaluation" > > > > 3) Kick off any "background" rules first. These are things like DNS > > lookup that can proceed (sort-of) asynchronously while computation goes > > on. > > These background rules must all be positive-weighted or the algorithm > > below breaks. > > > > 4) WHILE there are still negative-weighted rules OR your score is below > > the > > spam threshold: > > > > 4a) Run through the positive-weighted rules in order, until you either > > hit > > your threshold or there are no more positive rules left. > > 4b) Run through the negative-weighted rules in order, until you either > > dip > > below your threshold or there are no more negative rules left. > > > > 5) If you're below your threshold, wait for the scores to trickle in from > > the asynchronous rules and add them to the score. (You can stop if it > > exceeds the spam threshold). > > > > Nasty! > > > > Regards, > > > > David. > > _______________________________________________ > > NOTE: If there is a disclaimer or other legal boilerplate in the above > > message, it is NULL AND VOID. You may ignore it. > > > > Visit http://www.mimedefang.org and http://www.roaringpenguin.com > > MIMEDefang mailing list [EMAIL PROTECTED] > > http://lists.roaringpenguin.com/mailman/listinfo/mimedefang > >
