You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2007/10/31 03:54:39 UTC

[Bug 5710] New: config size sanity warnings.

http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5710

           Summary: config size sanity warnings.
           Product: Spamassassin
           Version: SVN Trunk (Latest Devel Version)
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: minor
          Priority: P5
         Component: spamassassin
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: mkettler_sa@verizon.net


As discussed over on sa-users I propose some basic sanity checks.
While these are currently intended to help novices realize that sa-blacklist is
detrimental to SA's health, I think implementing this as a general-purpose
feature is helpful in letting users know their configuration is "too large".

So I propose the following options, which cause the parser to generate warnings
only. The idea is to trigger warnings when the config is "probably absurd unless
you've got large hardware"

1) warn_conffile_maxsize  (speced in KB, default 1024)
   generates a warning if any single config file exceeds this size. Conf files
could be large, but 1MB is probably uncalled for.. 3.2.3 as shipped has 1 .cf
over 100k. My config has 7 over 100k when you count all the SARE stuff, but
neither has any over 200k

Others that might be useful:

2) warn_whiteblack_maxentries (speced in entries, default 8192) 
   generates a warning if the entries in whitelist_* or blacklist_* exceeds this
count. Anyone with more than 8k black/whitelists is probably doing a LOT wrong
on their system, not even considering the performance issues..

3) warn_conf_maxrerules  (speced in regex-based rules, default 32768)
   generates a warning if the number of body, rawbody, uri, full and header
rules exceeds this count. 

A crude grep shows SA 3.2.3 shipped with 1495 such rules (might be overstated, I
just grepped for "body ", etc..). My test box has a very large SARE contingent,
and that adds 3057 more rules for a total of 4552. Others might be larger, but
32k is probably absurd. meta rules are lightweight generally speaking, so
shouldn't be counted here, IMO..

Takers on these 3 options? A lot of folks liked the first one.. what about the
other two? (when it comes to it, please specify the scope of any votes ie: 1-3)
+1 or: 1) +1 2) 0 3) -1 )



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5710] config size sanity warnings.

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5710





------- Additional Comments From mkettler_sa@verizon.net  2007-10-31 05:55 -------
Well, I don't think the 10_misc.cf thing is going to work. The setting has to
live somewhere persistent in order for upgrades to work, and 10_misc.cf isn't
persistent.

I also don't think counters would work for 1), unless you want to store an the
name every file parsed and its size. I think for 1) to really serve its purpose,
the warning should list off all the over-sized files. Unfortunately, that makes
configuring this one difficult.

However, I do think counters (or perhaps array sizes that already exist) are the
way to go for 2) and 3).




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5710] config size sanity warnings.

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5710





------- Additional Comments From jm@jmason.org  2007-10-31 04:23 -------
if it's in a /usr/share/spamassassin/10*.cf file, that'd work fine too;
alternatively (and IMO better) we can just keep counters, and defer actually
issuing the warnings until all of the system-wide config has been parsed.  That
way a later config (or /etc/mail/spamassassin file) can modify the levels
if they like.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5710] config size sanity warnings.

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5710


mkettler_sa@verizon.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|minor                       |enhancement




------- Additional Comments From mkettler_sa@verizon.net  2007-10-30 20:58 -------
True, although it could also be done in a .pre file.. Although that might set a
bad precedent that you can stick config options in .pre files..

However, 2) and 3) could be implemented without such a need. Those warnings
could, and probably should, be generated after all the configfiles are parsed. 

But I do see your point that for 1) you want to generate the warning as the
files are read, and for that to happen, the setting needs to be in-place already.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5710] config size sanity warnings.

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5710





------- Additional Comments From parkerm@pobox.com  2007-10-30 20:04 -------
I'm thinking this sort of thing needs to be command line so that it can be in
affect when config parsing begins.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.