Nicola Piazzi wrote:
> How to do it syncronously ?
> It is not important to process a single mail in 5 or 50 seconds
> 4 me ss most important to reduce load

DNS lookups have essentially zero cost next to almost anything else SA
does.  I can say for certain that shortcircuit works;  I use it on the
USER_IN_*_WHITELIST rules and it does what I needed, which was to skip
the expensive regular expression processing and return in less than a
tenth of a second rather than spending CPU time running all the stock
and local rules on a message that wasn't going to be tagged anyway.

However, since the DNS requests are fired off before any other rule
processing is done, you *will* get back some of those results before
anything else has completed.  Since you're shortcircuiting on Bayes,
that extends the timeframe for DNS results to come back (if you do much
volume at all, a *lot* of your DNS results will be in your local cache,
so they'll come back very quickly).

If you really want your only rule hit on a shortcircuited message to be
Bayes, you'll have to either disable DNS lookups, or dig deep into the
core SA processing to defer sending DNS requests.

-kgd

Reply via email to