SA Bugzilla – Bug 4165
Add ability to turn off all network tests (ie local_tests_only) via config
Last modified: 2019-10-02 10:51:09 UTC
Site rules contain: use_dcc 0 use_razor2 0 use_pyzor 0 skip_rbl_checks 0 dns_available no use_bayes 0 /etc/local/spamassassin/init.pre has: all plugins commented out a 'spamassassin -x -D --siteconfigpath=/etc/local/spamassassin' (I don't have a user preferences file) still reports that rule set 1 is chosen. I believe rule set 0 should be chosen under these circumstances. All default rules (/usr/share/spamassassin/*) have not been modified. Attached is the init.pre, local.cf and the output of the above command.
Created attachment 2672 [details] File produced by the mentioned spamassassin command
Created attachment 2673 [details] The init.pre file
Created attachment 2674 [details] The local.cf file
I forgot to mention the --lint option to the above spamassassin command. --lint is present on that command line.
To get scoreset 0, you MUST explicitly instantiate the SA object with local_tests_only (ie -L for spamassassin or spamd) If you're using the API directly, you should pass in local_tests_only => 1 when creating the SA object.
Subject: Re: Add ability to turn off all network tests (ie local_tests_only) via config On Tue, Mar 01, 2005 at 09:37:09PM -0800, bugzilla-daemon@bugzilla.spamassassin.org wrote: > Summary|spamassassin chooses an |Add ability to turn off all > |incorrect score set when all|network tests (ie > |network tests, bayes tests, |local_tests_only) via config > |and plugins are disabled | I'm pretty close to -1 on this for a config POV. It may not be such a bad idea for scoreset to change based on rule hits though. ie: BAYES_50 hits, shift from scoreset 2/3 to 0/1. If no "tflag net" rules hit, shift to scoreset 0/2, etc. But that's another discussion. ;)
Subject: Re: Add ability to turn off all network tests (ie local_tests_only) via config I'm -0. The issue arose from an IRC conversation. Someone using SA with MailScanner, which doesn't provide a way to pass local_tests_only at object creation time. They tried turning off every network test they could find, but things still ran at set 1. In his case, without hacking the MailScanner code, it was impossible to run in set 0.
Subject: Re: Add ability to turn off all network tests (ie local_tests_only) via config On Tue, Mar 01, 2005 at 10:02:38PM -0800, bugzilla-daemon@bugzilla.spamassassin.org wrote: > It may not be such a bad idea for scoreset to change based on rule > hits though. ie: BAYES_50 hits, shift from scoreset 2/3 to 0/1. If no > "tflag net" rules hit, shift to scoreset 0/2, etc. Actually, in thinking about this more, it breaks pretty completely in terms of short circuiting, etc.
Subject: Re: Add ability to turn off all network tests (ie local_tests_only) via config On Wed, Mar 02, 2005 at 05:52:43AM -0800, bugzilla-daemon@bugzilla.spamassassin.org wrote: > In his case, without hacking the MailScanner code, it was impossible > to run in set 0. Ok, so this is a MailScanner issue. We provide a way to disable net tests, if people use the API and don't use that flag, that's the other code's problem. IMO.
I don't consider this a MailScanner issue. It makes absolutely no sense why turning off every possible network test results in the use of score set 1. I'm saying SpamAssassin should recognize that it can't possibly perform a network test and pick the appropriate score set. The current behavior is completely counter-intuitive.
This issue may also affect MIMEDefang, I have noticed score differences for a long time.
Subject: Re: Add ability to turn off all network tests (ie local_tests_only) via config On Wed, Mar 02, 2005 at 07:14:54AM -0800, bugzilla-daemon@bugzilla.spamassassin.org wrote: > I don't consider this a MailScanner issue. It makes absolutely no sense why > turning off every possible network test results in the use of score set 1. I'm > saying SpamAssassin should recognize that it can't possibly perform a network Except the documented and supported way to say "turn off all network tests" is setting the local_tests_only option. I don't think the overhead is worth the benefit -- MailScanner really should just support the standard way of disabling network tests, and no one would try disabling all the network checks manually when using the standard tools. But... Patches accepted. :)
Triage: I agree that if all local tests are intentionally turned off, or network tests cannot be run, then the no-network score sets should be used. Setting target to "future" so this doesn't get dropped. As Theo said, patches accepted.
There's no way for SA to know at runtime if "all local tests are intentionally turned off, or network tests cannot be run", use -L or API, closing.