You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by "Wood, Thomas" <Th...@BELLSOUTH.COM> on 2004/02/16 16:05:08 UTC

Effective limits to rules in local.cf

Please forgive me for asking what I'm sure is a common question, but
I've checked every faq, site and archive of this list I can find to no
avail.  Is there practical limit to the number of rules I can add to
local.cf?

Thanks in adavance

*****
"The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material.  Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited.  If you received this in error, please contact the sender and delete the material from all computers."  113


Re: Effective limits to rules in local.cf

Posted by Matt Kettler <mk...@comcast.net>.
At 09:05 AM 2/16/04 -0600, Wood, Thomas wrote:
>Please forgive me for asking what I'm sure is a common question, but
>I've checked every faq, site and archive of this list I can find to no
>avail.  Is there practical limit to the number of rules I can add to
>local.cf?

It's really less limited by the number of rules, and usually more limited 
by the total complexity of the rules.

Since the rules are in regex syntax, a complicated rule which uses 
multi-path string matching with lots of backtracing can take as much time 
to execute as dozens of simple rules, if not a hundred of them.  This is 
going to cause CPU exhaustion.

Of course, if your system is very low on ram, then the total number of 
bytes of strings to search is going to be a big limiter. However, most 
heavy-load systems generally have plenty of extra ram (since it's cheap) 
and generally just hit a "I'm processing mail slower than it's coming in" 
limit.

Really, since "too much" is a function of amount of incoming mail, CPU and 
ram resources, as well as rule count and complexity you are probably best 
off just doing some real world testing and ease rules in while keeping an 
eye on memory and CPU load.