[Mimedefang] Memory Limit Variables?
David F. Skoll
dfs at roaringpenguin.com
Thu Apr 12 17:04:03 EDT 2007
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.
More information about the MIMEDefang
mailing list