You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Da...@ChaosReigns.com on 2010/10/30 03:42:34 UTC

Only running network tests when necessary - feature request

I'd like to see spamassassin only run network tests when they might
affect the outcome.

For example, if you run all non-network tests, and at that point an email's
score qualifies as spam, and then you run all the non-spam network tests
(hitting whitelists), and it still qualifies as spam, there's no reason
to ever run the spam network tests (hitting blacklists).

Right?

Perl pseudocode:

run_non_network_tests();
NETTEST: while (1) {
  if ($score < 5) {
    run_one_network_spam_test() or last NETTEST;
  } else {
    run_one_network_nonspam_test() or last NETTEST;
  }
}


Of course it would be necessary to have an option to disable this, for
things like submitting corpora to the mass checks.

I would probably run the network tests in random order.  But I might have
more affinity for randomness than average.

-- 
"Let's just say that if complete and utter chaos was lightning, then
he'd be the sort to stand on a hilltop in a thunderstorm wearing wet
copper armour and shouting 'All gods are bastards'." - The Color of Magic
http://www.ChaosReigns.com

Re: Only running network tests when necessary - feature request

Posted by RW <rw...@googlemail.com>.
On Sat, 30 Oct 2010 10:28:09 +0200
Yet Another Ninja <sa...@alexb.ch> wrote:

> On 2010-10-30 9:56, RW wrote:
> > On Sat, 30 Oct 2010 02:23:00 -0400
> > Darxus@ChaosReigns.com wrote:
> > 
> > 
> >> But the total amount of bandwidth and processing time saved on the
> >> internet from not running unnecessary tests on every instance of
> >> spamassassin seems worth doing.
> > 
> > You are also wasting resources by putting the round-trips on the
> > critical path and tying-up a child process. And if you are
> > checking a lot of mail you are presumably using rsync. 
> 
> rsync? to check mail?

To sync local copies of blocklist data rather using dns.

Re: Only running network tests when necessary - feature request

Posted by "Daryl C. W. O'Shea" <sp...@dostech.ca>.
On 30/10/2010 4:28 AM, Yet Another Ninja wrote:
> rsync? to check mail?

Hrm, not a bad idea for the basis of a bayesian filter.

Daryl


Re: Only running network tests when necessary - feature request

Posted by Yet Another Ninja <sa...@alexb.ch>.
On 2010-10-30 9:56, RW wrote:
> On Sat, 30 Oct 2010 02:23:00 -0400
> Darxus@ChaosReigns.com wrote:
> 
> 
>> But the total amount of bandwidth and processing time saved on the
>> internet from not running unnecessary tests on every instance of
>> spamassassin seems worth doing.
> 
> You are also wasting resources by putting the round-trips on the
> critical path and tying-up a child process. And if you are
> checking a lot of mail you are presumably using rsync. 

rsync? to check mail?

Re: Only running network tests when necessary - feature request

Posted by RW <rw...@googlemail.com>.
On Sat, 30 Oct 2010 02:23:00 -0400
Darxus@ChaosReigns.com wrote:


> But the total amount of bandwidth and processing time saved on the
> internet from not running unnecessary tests on every instance of
> spamassassin seems worth doing.

You are also wasting resources by putting the round-trips on the
critical path and tying-up a child process. And if you are
checking a lot of mail you are presumably using rsync. 

It would  also be more complex that you think, because you haven't taken
into account negative scoring network rules. 

Re: Only running network tests when necessary - feature request

Posted by Henrik K <he...@hege.li>.
On Sat, Oct 30, 2010 at 09:28:27PM +0100, Justin Mason wrote:
> btw, I think this is already possible using the shortcircuit plugin.
> Just use rule priorities to run the non-net rules first, and
> shortcircuit if they are sufficient.

Currently DNS queries are sent no matter what, but it's fixable..

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5930

Re: Only running network tests when necessary - feature request

Posted by Justin Mason <jm...@jmason.org>.
btw, I think this is already possible using the shortcircuit plugin.
Just use rule priorities to run the non-net rules first, and
shortcircuit if they are sufficient.

On Sat, Oct 30, 2010 at 08:05, Henrik K <he...@hege.li> wrote:
> On Sat, Oct 30, 2010 at 02:23:00AM -0400, Darxus@ChaosReigns.com wrote:
>> On 10/30, Michael Parker wrote:
>> > > I'd like to see spamassassin only run network tests when they might
>> > > affect the outcome.
>> >
>> > Why?
>>
>> To reduce the network load on my server which is one of the hosts of the
>> DNSWL.org list?
>>
>> > Assuming a reasonably fast connection network checks are basically free.
>>
>> That seems weird.
>>
>> But the total amount of bandwidth and processing time saved on the
>> internet from not running unnecessary tests on every instance of
>> spamassassin seems worth doing.
>>
>> Why not?
>
> It's nice that you are requesting a feature without any single proof that it
> would be generally useful. It would only make things in all ways much more
> complex, create additional delays, hinder log analyzing etc. What if there
> are lots of metas involving DNS rules or shortcircuits etc? It would become
> a big mess.
>
> This is just a different variation of the age old question that pops up here
> now and then. No one has yet showed it would have enough merits to
> implement.
>
>

Re: Only running network tests when necessary - feature request

Posted by Henrik K <he...@hege.li>.
On Sat, Oct 30, 2010 at 02:23:00AM -0400, Darxus@ChaosReigns.com wrote:
> On 10/30, Michael Parker wrote:
> > > I'd like to see spamassassin only run network tests when they might
> > > affect the outcome.
> > 
> > Why?
> 
> To reduce the network load on my server which is one of the hosts of the
> DNSWL.org list?
> 
> > Assuming a reasonably fast connection network checks are basically free.
> 
> That seems weird.
> 
> But the total amount of bandwidth and processing time saved on the
> internet from not running unnecessary tests on every instance of
> spamassassin seems worth doing.
> 
> Why not?

It's nice that you are requesting a feature without any single proof that it
would be generally useful. It would only make things in all ways much more
complex, create additional delays, hinder log analyzing etc. What if there
are lots of metas involving DNS rules or shortcircuits etc? It would become
a big mess.

This is just a different variation of the age old question that pops up here
now and then. No one has yet showed it would have enough merits to
implement.


Re: Only running network tests when necessary - feature request

Posted by Da...@ChaosReigns.com.
On 10/30, Michael Parker wrote:
> > I'd like to see spamassassin only run network tests when they might
> > affect the outcome.
> 
> Why?

To reduce the network load on my server which is one of the hosts of the
DNSWL.org list?

> Assuming a reasonably fast connection network checks are basically free.

That seems weird.

But the total amount of bandwidth and processing time saved on the
internet from not running unnecessary tests on every instance of
spamassassin seems worth doing.

Why not?

-- 
"Some people will tell you that slow is good - and it may be, on some
days - but I am here to tell you that fast is better....
That is why God made fast motorcycles...." - Hunter S. Thompson
http://www.ChaosReigns.com

Re: Only running network tests when necessary - feature request

Posted by Michael Parker <pa...@pobox.com>.
On Oct 29, 2010, at 8:42 PM, Darxus@ChaosReigns.com wrote:

> I'd like to see spamassassin only run network tests when they might
> affect the outcome.

Why?

Assuming a reasonably fast connection network checks are basically free.

They are kicked off at the start of a scan and the results are compared at the end.  You're not exactly waiting on network tests to run since all the other rules are run in the mean time.


> 
> For example, if you run all non-network tests, and at that point an email's
> score qualifies as spam, and then you run all the non-spam network tests
> (hitting whitelists), and it still qualifies as spam, there's no reason
> to ever run the spam network tests (hitting blacklists).
> 
> Right?
> 
> Perl pseudocode:
> 
> run_non_network_tests();
> NETTEST: while (1) {
>  if ($score < 5) {
>    run_one_network_spam_test() or last NETTEST;
>  } else {
>    run_one_network_nonspam_test() or last NETTEST;
>  }
> }
> 

Ok, lets assume that this actually buys you something.  Good thing that you can provide your own Check.pm.  You can easily provide your own.

Michael


> 
> Of course it would be necessary to have an option to disable this, for
> things like submitting corpora to the mass checks.
> 
> I would probably run the network tests in random order.  But I might have
> more affinity for randomness than average.
> 
> -- 
> "Let's just say that if complete and utter chaos was lightning, then
> he'd be the sort to stand on a hilltop in a thunderstorm wearing wet
> copper armour and shouting 'All gods are bastards'." - The Color of Magic
> http://www.ChaosReigns.com