You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Marc Perkel <ma...@perkel.com> on 2009/03/03 17:32:49 UTC
2 + 2 != 4 - Spamassassin needs a new paradigm
Spamassassin works by adding up points. Rule A is 2 points, Rule B is 2
points therefore the score is 4 points. But is this the best way to
score? I don't think so.
What I'm seeing in the real world is that it's the combinations of rules
in ways where Rule A + Rule B = 10 points rather than 4. Or maybe Rule A
+ Rule B = -2 points because even though both are spam indicators
individually, together that are a ham indicator.
I do almost all my spam filtering with Exim rules and I use SA for the
1% that are still undetermined from Exim. And in Exim I have more
information to work with than SA because I can look at things (behavior)
that SA doesn't see. But what I'm doing is combining more rules than SA
is and - my point - SA can benefit from rule combinations.
As an example. The following by themselves are week indicators of spam.
Dynamic IP
Bad HELO
Hitting high numbers MX records
Not closing with QUIT
By themselves each would produce a LOT of false positives. But together
it's 100% definite it's a spam bot and not only can the message be
rejected, but the IP can be blacklisted. Another example. You do an RBL
lookup and the IP is listed in:
RBL-A 0.5
RBL-B 0.5
RBL-C 0.5
Score = 1.5 - NO - Score = 5! Usually multiple RBLs is a stronger
indicator than the sum of the scores. But suppose you find the IP listed
in the Hostkarma yellow list (yellow means mixed source of spam such as
yahoo, gmail, and hotmail) then the RBLs don't matter. In the above
example, say the 3 RBLs are US based and the spam is coming from
yahoo.fr. Most everything coming from yahoo France to American users is
spam and might get listed on low quality RBLs. But my point is that you
wouldn't want to assign a negative score for the yellow listing because
yellow doesn't mean it's not spam, it means it shouldn't be blacklisted.
The better logic is - if not yellow then add up the black scored. (A + B
+ C) * !yellow. Better to look up yellow first and then skip the RBLs if
found.
The important point here is that SA needs to evolve beyond the concept
of using addition to compute scores. Ideally there should be more hard
coded rule combinations or using baysian statistics to find how rule
combinations where the combinations are a more accurate indication than
the rules themselves.
Anyhow - just throwing this out there for people to chew on and think about.
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
> On Tue, Mar 3, 2009 at 16:59, Marc Perkel <ma...@perkel.com> wrote:
> > Yet Another Ninja wrote:
> >> On 3/3/2009 5:32 PM, Marc Perkel wrote:
> >> > The important point here is that SA needs to evolve beyond the concept
> >>>
> >>> of using addition to compute scores. Ideally there should be more hard
> >>> coded rule combinations or using baysian statistics to find how rule
> >>> combinations where the combinations are a more accurate indication than the
> >>> rules themselves.
> >>>
> >>> Anyhow - just throwing this out there for people to chew on and think
> >>> about.
> >>
> >> What you mean in SA languages is to use more meta rules.
> >>
> >>
> > Yes - meta rules is a step in the right direction and I do know SA has that.
> > What I'm asking is - perhaps there is a way to make an automatic meta rule
> > generator. Some way to statistically look at rule combinations to generate
> > meta rules.
On 03.03.09 17:45, Justin Mason wrote:
> yes -- there is at least 1 in the masses subdir, we've used it in the past.
> (to generate the ADVANCE_FEE_* ruleset iirc)
>
> it can be quite dangerous -- if the source rules have any FPs, this can
> wind up reinforcing the FPs and making them much more serious. that's
> why we haven't used it more widely.
otoh it can lower down FP rate. When we do a mass-check we do know the FP
rate for each rule, don't we? And we also know the rate of rule
combinations. So, we can and will expect some combinations to have
positive score, some will apparently have negative score...
--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
I don't have lysdexia. The Dog wouldn't allow that.
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by Justin Mason <jm...@jmason.org>.
On Tue, Mar 3, 2009 at 16:59, Marc Perkel <ma...@perkel.com> wrote:
> Yet Another Ninja wrote:
>> On 3/3/2009 5:32 PM, Marc Perkel wrote:
>> > The important point here is that SA needs to evolve beyond the concept
>>>
>>> of using addition to compute scores. Ideally there should be more hard
>>> coded rule combinations or using baysian statistics to find how rule
>>> combinations where the combinations are a more accurate indication than the
>>> rules themselves.
>>>
>>> Anyhow - just throwing this out there for people to chew on and think
>>> about.
>>
>> What you mean in SA languages is to use more meta rules.
>>
>>
> Yes - meta rules is a step in the right direction and I do know SA has that.
> What I'm asking is - perhaps there is a way to make an automatic meta rule
> generator. Some way to statistically look at rule combinations to generate
> meta rules.
yes -- there is at least 1 in the masses subdir, we've used it in the past.
(to generate the ADVANCE_FEE_* ruleset iirc)
it can be quite dangerous -- if the source rules have any FPs, this can
wind up reinforcing the FPs and making them much more serious. that's
why we haven't used it more widely.
--j.
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by Marc Perkel <ma...@perkel.com>.
Yet Another Ninja wrote:
> On 3/3/2009 5:32 PM, Marc Perkel wrote:
> > The important point here is that SA needs to evolve beyond the concept
>> of using addition to compute scores. Ideally there should be more
>> hard coded rule combinations or using baysian statistics to find how
>> rule combinations where the combinations are a more accurate
>> indication than the rules themselves.
>>
>> Anyhow - just throwing this out there for people to chew on and think
>> about.
>
> What you mean in SA languages is to use more meta rules.
>
>
Yes - meta rules is a step in the right direction and I do know SA has
that. What I'm asking is - perhaps there is a way to make an automatic
meta rule generator. Some way to statistically look at rule combinations
to generate meta rules.
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by Yet Another Ninja <sa...@alexb.ch>.
On 3/3/2009 5:32 PM, Marc Perkel wrote:
> The important point here is that SA needs to evolve beyond the concept
> of using addition to compute scores. Ideally there should be more hard
> coded rule combinations or using baysian statistics to find how rule
> combinations where the combinations are a more accurate indication than
> the rules themselves.
>
> Anyhow - just throwing this out there for people to chew on and think
> about.
What you mean in SA languages is to use more meta rules.
Spamssassin is a framework with many tools designed for a VERY wide user
base.
The basic setup does a good job at tagging well over 80% of spam, with a
suprising small FP ratio.
If a user whatn's more, he has to learn how to use his tools and squeeze
more out of it.
SARE was meant to help in this till it became a commodity and the team
lost interest due to the lack of fresh talent and lack or resources,
mainly volunteer's time.
Nice to know someone has the energy to come up with new ideas and offer
them to the public.
Nobody will stop you from submitting any rules to the project, thru the
official channels
Axb
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Tue, 2009-03-03 at 09:38 -0800, Marc Perkel wrote:
>
> Karsten Bräckelmann wrote:
> > I guess one would need a new plugin for the above "yellow" RBLs, due to
> > the problem of limiting all hits per URI / IP as mentioned above. Also,
> > of course, one first needs a reliably and publicly available
> > do-not-blacklist RBL.
>
> I have such an RBL. hostkarma.junkemailfilter.com which returns the
> following codes.
Yes, we know. However, that does not address any of the other issues.
There have not been any QA for that list yet, let alone long-time stats.
For that we don't know about its performance or reliability. QA and
evaluation needs to be done first. Plus, we lack the necessary plugin
that can apply this logic.
> The logic is as follows. If yellow - move on. If white - accept and
> deliver. If nobll then move on skipping all other RBL lookups. Then I
> look up several black lists and I assign point values to eack list based
> on my trust levels. If the lists are sufficiently black then the message
> is rejected. SA sould incorporate this kind of logic. I use it in Exim
> and it is extremely accurate.
And here we got another problem. SA does not reject. SA can't and isn't
meant to. However, if properly built into the chain, your MTA can.
Either based on the total score, or a hit of that yet-to-code plugin
under discussion. This is already possible.
Back to square one. Need QA, need the plugin...
--
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by Marc Perkel <ma...@perkel.com>.
Karsten Bräckelmann wrote:
> I guess one would need a new plugin for the above "yellow" RBLs, due to
> the problem of limiting all hits per URI / IP as mentioned above. Also,
> of course, one first needs a reliably and publicly available
> do-not-blacklist RBL.
>
>
I have such an RBL. hostkarma.junkemailfilter.com which returns the
following codes.
127.0.0.1 - white - the message is ham
127.0.0.2 - black - the message is spam
127.0.0.3 - yellow - the IP contains no useful information
127.0.0.4 - brown - the IP is leaning spam - worth a point or so
127.0.0.5 - nobl - the IP should not be blacklisted - but may be white.
hostkarma.junkemailfilter.com also tests host names as well as IP addresses.
The logic is as follows. If yellow - move on. If white - accept and
deliver. If nobll then move on skipping all other RBL lookups. Then I
look up several black lists and I assign point values to eack list based
on my trust levels. If the lists are sufficiently black then the message
is rejected. SA sould incorporate this kind of logic. I use it in Exim
and it is extremely accurate.
http://wiki.junkemailfilter.com/index.php/Spam_DNS_Lists
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Tue, 2009-03-03 at 08:32 -0800, Marc Perkel wrote:
> Spamassassin works by adding up points. Rule A is 2 points, Rule B is 2
> points therefore the score is 4 points. But is this the best way to
> score? I don't think so.
While there are a lot of "fixed score rules", this description doesn't
measure up with SA. There are a lot of meta-rule that pretty much do
exactly that in various combinations of the logic.
> What I'm seeing in the real world is that it's the combinations of rules
> in ways where Rule A + Rule B = 10 points rather than 4. Or maybe Rule A
> + Rule B = -2 points because even though both are spam indicators
> individually, together that are a ham indicator.
yup, meta-rules
> I do almost all my spam filtering with Exim rules and I use SA for the
> 1% that are still undetermined from Exim. And in Exim I have more
> information to work with than SA because I can look at things (behavior)
> that SA doesn't see. But what I'm doing is combining more rules than SA
> is and - my point - SA can benefit from rule combinations.
SA *does* benefit from rule combinations. SA *can* benefit from such MTA
visible stuff, if you make it visible to SA, too. For example by
injecting some headers that indicate these MTA tests and variables.
> As an example. The following by themselves are week indicators of spam.
>
> Dynamic IP
> Bad HELO
> Hitting high numbers MX records
> Not closing with QUIT
Just tell SA about the latter two, and write a trivial meta.
> By themselves each would produce a LOT of false positives. But together
> it's 100% definite it's a spam bot and not only can the message be
> rejected, but the IP can be blacklisted. Another example. You do an RBL
> lookup and the IP is listed in:
>
> RBL-A 0.5
> RBL-B 0.5
> RBL-C 0.5
>
> Score = 1.5 - NO - Score = 5! Usually multiple RBLs is a stronger
> indicator than the sum of the scores. But suppose you find the IP listed
Such rules do exist already, and are being evaluated in the sandboxes
for QA. grep for META...
> in the Hostkarma yellow list (yellow means mixed source of spam such as
> yahoo, gmail, and hotmail) then the RBLs don't matter. In the above
> example, say the 3 RBLs are US based and the spam is coming from
> yahoo.fr. Most everything coming from yahoo France to American users is
> spam and might get listed on low quality RBLs. But my point is that you
> wouldn't want to assign a negative score for the yellow listing because
> yellow doesn't mean it's not spam, it means it shouldn't be blacklisted.
> The better logic is - if not yellow then add up the black scored. (A + B
> + C) * !yellow. Better to look up yellow first and then skip the RBLs if
> found.
Exactly such exonerating sub-rules are used already in a lot of
meta-rules. The existing and used concept easily can be applied to RBL
tests, too -- if SA uses such "yellow" lists.
There is a real problem with what you just proposed, though. E.g. the
existence of a URI that should not be blacklisted doesn't mean a hit for
another URI should be dropped. Sneaking in a link to apache.org doesn't
render mail.ru any less spammy.
Such a concept strictly must be applied to different RBL matches for one
and the same URI *only*.
> The important point here is that SA needs to evolve beyond the concept
> of using addition to compute scores. Ideally there should be more hard
> coded rule combinations or using baysian statistics to find how rule
> combinations where the combinations are a more accurate indication than
> the rules themselves.
Sounds like a dynamically adjusting GA run. I guess the problem here is
that this really needs a *lot* of ham, which most sites probably don't
have to the extent necessary. Also, keep in mind that's a rather costly
computation, to say the least.
> Anyhow - just throwing this out there for people to chew on and think about.
Not much news here, if you look closer at the existing rules. :)
I guess one would need a new plugin for the above "yellow" RBLs, due to
the problem of limiting all hits per URI / IP as mentioned above. Also,
of course, one first needs a reliably and publicly available
do-not-blacklist RBL.
--
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by RW <rw...@googlemail.com>.
On Tue, 03 Mar 2009 18:14:48 +0100
Karsten Bräckelmann <gu...@rudersport.de> wrote:
> About 98-99% of my spam in-stream scores as high, that any such
> proposal results in a useless increase of the score.
>
> The problem lies with the LOW scoring spam. Alas, these do not tend to
> trigger on a solid subset or meta as you proposed. In particular, RBL
> hits are quite rare, even more so for multiple hits. The few rules hit
> by low scorers are quite diverse, which complicates this.
I think this is a good point. And it probably would have more of an
effect on what hits a second threshold. It's not obvious whether this
is good or bad.
One of the thing I like best about Spamassassin is that its linear
scoring system lends itself well to identifying which spams are caught
beyond reasonable doubt, leaving the user to concentrate on the lower
scoring stuff. Statistical filters can be a Pyrrhic victory if you have
to look through 1000 spams to find FPs.
I wouldn't want to see the the whole scoring system become statistical,
but maybe there could be something that learns the characteristics
of FPs and FNs and adds relatively small tweaks to the existing
linear score.
Re: Dealing with low scoring spam - tighter MTA integration
Posted by Andrzej Adam Filip <an...@onet.eu>.
John Hardin <jh...@impsec.org> wrote:
> On Wed, 4 Mar 2009, Andrzej Adam Filip wrote:
>
>>> This would be an entirely different application, not SA, wouldn't it?
>>
>> It can be developed using the same "spam score" logic, based subset of
>> all tests requiring only the subset of "final data" available during
>> "classic run".
>
> So in other words something like SMTP-time DNSBL tests that score
> points towards rejection rather than being pass/fail? That sounds like
> a good idea.
>
>> I do think that promoting tools that encourage postmaster to care very
>> much about mail server (IP address) reputation can make real difference
>> e.g. caring to be above reputation "none" in DNSWL to avoid grey-listing.
>
> Agreed. But, performing major redesign of SA to achieve this pre-RCPT
> is going to be a tough sell.
>
>>> Well, this probably could be done in SA using a multi-level protocol
>>> capable of returning values at different stages. However, this seems
>>> perfectly suited for a lightweight tool, rather than a hog that is
>>> designed to scan and process entire messages. :)
>>
>> During initial tests/deployment *much* simpler implementation can be
>> used with recommended action based on spam score:
>>
>> It would require redesign of 50_scores.cf structure.
>> e.g. instead of
>> score RCVD_IN_DNSWL_HI 0 -8 0 -8
>> something like that
>> # N - Network, B - Bayes, nX - no X, R - "RCPT TO:"
>> score RCVD_IN_DNSWL_HI nNnB=0 NnB=-8 nNB=0 NB=-8 R=-8
>> or shorter
>> score RCVD_IN_DNSWL_HI N=-8 R=-8
>
> Why would SA be served by _major_ modifications like this, rather than
> writing a new milter that focuses on determining the reputation of an
> IP? Are you really willing to break _all_ existing SA installations
> for this?
>
> Please don't try to make SA a "do everything" tool, you'll likely
> weaken what it does an outstanding job of today.
0) Such _major_ modification means introducing it in next _major_
spamassassin release unless it can be made "downward compatible"
e.g. by using *separate* "score file" for at "RCPT TO:" tests.
Where there's a Will, there's a way
1) I want milter(s) (MIMEDefang's filtering script in perl) to use
spamassassin in such role. I personally prefer such tools from teams
with well established "maintenance reputation". I also believe that
SA "score tuning methodology" would fit very well too.
2) Anyway limiting scores to *only* four cases *SHOULD NOT* "stay forever".
--
[pl>en: Andrew] Andrzej Adam Filip : anfi@onet.eu
"All the people are so happy now, their heads are caving in.
I'm glad they are a snowman with protective rubber skin"
-- They Might Be Giants
Re: Dealing with low scoring spam - tighter MTA integration
Posted by John Hardin <jh...@impsec.org>.
On Wed, 4 Mar 2009, Andrzej Adam Filip wrote:
>> This would be an entirely different application, not SA, wouldn't it?
>
> It can be developed using the same "spam score" logic, based subset of
> all tests requiring only the subset of "final data" available during
> "classic run".
So in other words something like SMTP-time DNSBL tests that score points
towards rejection rather than being pass/fail? That sounds like a good
idea.
> I do think that promoting tools that encourage postmaster to care very
> much about mail server (IP address) reputation can make real difference
> e.g. caring to be above reputation "none" in DNSWL to avoid grey-listing.
Agreed. But, performing major redesign of SA to achieve this pre-RCPT is
going to be a tough sell.
>> Well, this probably could be done in SA using a multi-level protocol
>> capable of returning values at different stages. However, this seems
>> perfectly suited for a lightweight tool, rather than a hog that is
>> designed to scan and process entire messages. :)
>
> During initial tests/deployment *much* simpler implementation can be
> used with recommended action based on spam score:
>
> It would require redesign of 50_scores.cf structure.
> e.g. instead of
> score RCVD_IN_DNSWL_HI 0 -8 0 -8
> something like that
> # N - Network, B - Bayes, nX - no X, R - "RCPT TO:"
> score RCVD_IN_DNSWL_HI nNnB=0 NnB=-8 nNB=0 NB=-8 R=-8
> or shorter
> score RCVD_IN_DNSWL_HI N=-8 R=-8
Why would SA be served by _major_ modifications like this, rather than
writing a new milter that focuses on determining the reputation of an IP?
Are you really willing to break _all_ existing SA installations for this?
Please don't try to make SA a "do everything" tool, you'll likely weaken
what it does an outstanding job of today.
--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
jhardin@impsec.org FALaholic #11174 pgpk -a jhardin@impsec.org
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
Failure to plan ahead on someone else's part does not constitute
an emergency on my part. -- David W. Barts in a.s.r
-----------------------------------------------------------------------
4 days until Daylight Saving Time begins in U.S. - Spring Forward
Re: Dealing with low scoring spam - tighter MTA integration
Posted by Andrzej Adam Filip <an...@onet.eu>.
Karsten Bräckelmann <gu...@rudersport.de> wrote:
> On Wed, 2009-03-04 at 16:02 +0100, Andrzej Adam Filip wrote:
>> Karsten Bräckelmann <gu...@rudersport.de> wrote:
>
>> > About 98-99% of my spam in-stream scores as high, that any such proposal
>> > results in a useless increase of the score.
>> >
>> > The problem lies with the LOW scoring spam. Alas, these do not tend to
>> > trigger on a solid subset or meta as you proposed. In particular, RBL
>> > hits are quite rare, even more so for multiple hits. The few rules hit
>> > by low scorers are quite diverse, which complicates this.
>>
>> May be spamassassin should create set of tests intended for use before
>> replying "RCPT TO:" in SMTP session?
>> [ test based on: sending IP address, envelope sender, envelope
>> recipient, and name in helo/ehlo ]
>
> This would be an entirely different application, not SA, wouldn't it?
It can be developed using the same "spam score" logic, based subset of
all tests requiring only the subset of "final data" available during
"classic run".
I do think that promoting tools that encourage postmaster to care very
much about mail server (IP address) reputation can make real difference
e.g. caring to be above reputation "none" in DNSWL to avoid grey-listing.
> Well, this probably could be done in SA using a multi-level protocol
> capable of returning values at different stages. However, this seems
> perfectly suited for a lightweight tool, rather than a hog that is
> designed to scan and process entire messages. :)
During initial tests/deployment *much* simpler implementation can be
used with recommended action based on spam score:
It would require redesign of 50_scores.cf structure.
e.g. instead of
score RCVD_IN_DNSWL_HI 0 -8 0 -8
something like that
# N - Network, B - Bayes, nX - no X, R - "RCPT TO:"
score RCVD_IN_DNSWL_HI nNnB=0 NnB=-8 nNB=0 NB=-8 R=-8
or shorter
score RCVD_IN_DNSWL_HI N=-8 R=-8
>> Possible "recommended actions": accept, temporary reject, permanent
>> reject - with choice based on "spam score" *AND* mail source reputation.
>>
>> Temporary reject in SMTP session should increase chances of DNSBL hits
>> by reducing "blind spot" period of newly created spam sources.
>
> Experience with grey-listing, tempfail or whatever varies wildly given
> the posts to this list. Some do report, that the zombies won't retry
> anyway after being tempfailed once. So a later DNSBL hit after the list
> catching up and DNS propagation may be even irrelevant.
There are "DUL zombies" that effectively do frequent "IP address hoping"
and "static NAT zombies". The former are bigger in number, the later
produce higher spam volume (IMHO).
--
[pl>en: Andrew] Andrzej Adam Filip : anfi@onet.eu
All the taxes paid over a lifetime by the average American are spent by
the government in less than a second.
-- Jim Fiebig
Re: Dealing with low scoring spam - tighter MTA integration [was:
2 + 2 != 4 - Spamassassin needs a new paradigm]
Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Wed, 2009-03-04 at 16:02 +0100, Andrzej Adam Filip wrote:
> Karsten Bräckelmann <gu...@rudersport.de> wrote:
> > About 98-99% of my spam in-stream scores as high, that any such proposal
> > results in a useless increase of the score.
> >
> > The problem lies with the LOW scoring spam. Alas, these do not tend to
> > trigger on a solid subset or meta as you proposed. In particular, RBL
> > hits are quite rare, even more so for multiple hits. The few rules hit
> > by low scorers are quite diverse, which complicates this.
>
> May be spamassassin should create set of tests intended for use before
> replying "RCPT TO:" in SMTP session?
> [ test based on: sending IP address, envelope sender, envelope
> recipient, and name in helo/ehlo ]
This would be an entirely different application, not SA, wouldn't it?
Well, this probably could be done in SA using a multi-level protocol
capable of returning values at different stages. However, this seems
perfectly suited for a lightweight tool, rather than a hog that is
designed to scan and process entire messages. :)
> Possible "recommended actions": accept, temporary reject, permanent
> reject - with choice based on "spam score" *AND* mail source reputation.
>
> Temporary reject in SMTP session should increase chances of DNSBL hits
> by reducing "blind spot" period of newly created spam sources.
Experience with grey-listing, tempfail or whatever varies wildly given
the posts to this list. Some do report, that the zombies won't retry
anyway after being tempfailed once. So a later DNSBL hit after the list
catching up and DNS propagation may be even irrelevant.
--
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}
Re: Dealing with low scoring spam - tighter MTA integration
[was: 2 + 2 != 4 - Spamassassin needs a new paradigm]
Posted by SM <sm...@resistor.net>.
At 07:02 04-03-2009, Andrzej Adam Filip wrote:
>May be spamassassin should create set of tests intended for use before
>replying "RCPT TO:" in SMTP session?
>[ test based on: sending IP address, envelope sender, envelope
>recipient, and name in helo/ehlo ]
SpamAssassin processes the message and returns the result. The way
it is designed, it can be integrated in different environments as it
is MTA agnostic. The change you propose could be done by introducing
a new command in the protocol to evaluate the envelope information only.
It would be easier to do all that through a milter as there is less
overhead. The downside is that you will get more false positives.
Regards,
-sm
Re: Dealing with low scoring spam - tighter MTA integration
Posted by Andrzej Adam Filip <an...@onet.eu>.
James Wilkinson <sa...@aprilcottage.co.uk> wrote:
> Andrzej Adam Filip wrote:
>> At "RCPT TO:" stage there are available:
>> * connecting client IP address (last mail hop)
>> so big part of DNSBL and DNSWL tests *CAN* be used
>> * envelope sender for SPF based tests
>> * envelope sender and envelope recipient for auto white/black listing
>> (producing some kind of grey-listing based for first attempt from
>> unknown reputation source)
>
> Are you thinking that it might be good to tie this in to the
> SpamAssassin AWL score? So a sender with an existing low AWL might be
> allowed through even if the sending host gets on one or two DNSBLs?
I want "a platform" allowing many people to contribute
"small improvements" e.g. whilte-listing based on combination
of sender address and ASN (or routing prefix).
> And you’re missing the possibility of doing reverse DNS lookups, too.
I have considered it to be obvious derivate of "connecting client IP address"
--
[pl>en: Andrew] Andrzej Adam Filip : anfi@onet.eu
Seek simplicity -- and distrust it.
-- Alfred North Whitehead
Re: Dealing with low scoring spam - tighter MTA integration
Posted by James Wilkinson <sa...@aprilcottage.co.uk>.
Andrzej Adam Filip wrote:
> At "RCPT TO:" stage there are available:
> * connecting client IP address (last mail hop)
> so big part of DNSBL and DNSWL tests *CAN* be used
> * envelope sender for SPF based tests
> * envelope sender and envelope recipient for auto white/black listing
> (producing some kind of grey-listing based for first attempt from
> unknown reputation source)
Are you thinking that it might be good to tie this in to the
SpamAssassin AWL score? So a sender with an existing low AWL might be
allowed through even if the sending host gets on one or two DNSBLs?
And you’re missing the possibility of doing reverse DNS lookups, too.
James.
--
E-mail: james@ | A: Because people don’t normally read bottom to top.
aprilcottage.co.uk | Q: Why is top-posting such a bad thing?
| A: Top-posting.
| Q: What is the most annoying thing in e-mail and usenet?
Re: Dealing with low scoring spam - tighter MTA integration
Posted by Kenneth Porter <sh...@sewingwitch.com>.
--On Thursday, March 05, 2009 10:31 PM +0100 Andrzej Adam Filip
<an...@onet.eu> wrote:
> I try hard to preach that SA methodology of creating "spam score" based
> on weighted tests *CAN* be applied at this point too.
> I would like too apply such test in milter (MIMEDefang) that uses SA
> anyway in my installation.
A cheap way of doing it would be to construct an artificial message from
the information available. One would probably want to use a custom set of
rules (ie. strip out most of the normal rules that assume a full set of
headers and a regular body).
> At "RCPT TO:" stage there are available:
> * connecting client IP address (last mail hop)
> so big part of DNSBL and DNSWL tests *CAN* be used
> * envelope sender for SPF based tests
> * envelope sender and envelope recipient for auto white/black listing
> (producing some kind of grey-listing based for first attempt from
> unknown reputation source)
Instead of running all of SA, perhaps you could just invoke the individual
plugins from their Perl entry points. I'm not familiar enough with SA's
architecture to know how practical that is, though.
Re: Dealing with low scoring spam - tighter MTA integration
Posted by Andrzej Adam Filip <an...@onet.eu>.
Kenneth Porter <sh...@sewingwitch.com> wrote:
> --On Thursday, March 05, 2009 7:43 AM +0100 Andrzej Adam Filip
> <an...@onet.eu> wrote:
>
>> What I would like to see is a option to make spam assassin to produce
>> "weighted scores" based on subset of all tests capable to work on subset
>> of the "final data" available *before* message headers&body are
>> transfered in SMTP session.
>
> Before you get the DATA part, you only have the EHLO and envelope.
At "RCPT TO:" stage there are available:
* connecting client IP address (last mail hop)
so big part of DNSBL and DNSWL tests *CAN* be used
* envelope sender for SPF based tests
* envelope sender and envelope recipient for auto white/black listing
(producing some kind of grey-listing based for first attempt from
unknown reputation source)
> Not a real need for a full-blown SA scan at that point.
I try hard to preach that SA methodology of creating "spam score" based
on weighted tests *CAN* be applied at this point too.
I would like too apply such test in milter (MIMEDefang) that uses SA
anyway in my installation.
> What rules would you apply that couldn't be done with a simple Perl
> function?
SA is not "a simple set of perl functions"? ;-)
Delivering such functionality via SA would assure keeping sync of
weights with changing spamming patterns. Some spammers are smart,
many spammers are smart enough to follow so quality of maintenance team
and maintenance methodology does make difference.
> (For lurkers, MIMEDefang allows one to write a Sendmail milter in
> Perl, by providing a C-to-Perl translation layer.)
--
[pl>en: Andrew] Andrzej Adam Filip : anfi@onet.eu
You can't have everything. Where would you put it?
-- Steven Wright
Re: Dealing with low scoring spam - tighter MTA integration
Posted by Kenneth Porter <sh...@sewingwitch.com>.
--On Thursday, March 05, 2009 7:43 AM +0100 Andrzej Adam Filip
<an...@onet.eu> wrote:
> What I would like to see is a option to make spam assassin to produce
> "weighted scores" based on subset of all tests capable to work on subset
> of the "final data" available *before* message headers&body are
> transfered in SMTP session.
Before you get the DATA part, you only have the EHLO and envelope. Not a
real need for a full-blown SA scan at that point. What rules would you
apply that couldn't be done with a simple Perl function? (For lurkers,
MIMEDefang allows one to write a Sendmail milter in Perl, by providing a
C-to-Perl translation layer.)
Re: Dealing with low scoring spam - tighter MTA integration
Posted by Andrzej Adam Filip <an...@onet.eu>.
Kenneth Porter <sh...@sewingwitch.com> wrote:
> --On Wednesday, March 04, 2009 4:02 PM +0100 Andrzej Adam Filip
> <an...@onet.eu> wrote:
>
>> May be spamassassin should create set of tests intended for use before
>> replying "RCPT TO:" in SMTP session?
>
> Check out <http://mimedefang.org/>
>
> MIMEDefang includes SA integration.
I know MIMEDefang and I use it on one installation.
What I would like to see is a option to make spam assassin to produce
"weighted scores" based on subset of all tests capable to work on subset
of the "final data" available *before* message headers&body are
transfered in SMTP session.
--
[pl>en: Andrew] Andrzej Adam Filip : anfi@onet.eu
Treaties are like roses and young girls -- they last while they last.
-- Charles DeGaulle
Re: Dealing with low scoring spam - tighter MTA integration [was: 2
+ 2 != 4 - Spamassassin needs a new paradigm]
Posted by Kenneth Porter <sh...@sewingwitch.com>.
--On Wednesday, March 04, 2009 4:02 PM +0100 Andrzej Adam Filip
<an...@onet.eu> wrote:
> May be spamassassin should create set of tests intended for use before
> replying "RCPT TO:" in SMTP session?
Check out <http://mimedefang.org/>
MIMEDefang includes SA integration.
Dealing with low scoring spam - tighter MTA integration [was: 2 + 2 != 4 - Spamassassin needs a new paradigm]
Posted by Andrzej Adam Filip <an...@onet.eu>.
Karsten Bräckelmann <gu...@rudersport.de> wrote:
> On Tue, 2009-03-03 at 08:32 -0800, Marc Perkel wrote:
>> Spamassassin works by adding up points. Rule A is 2 points, Rule B is 2
>> points therefore the score is 4 points. But is this the best way to
>> score? I don't think so.
> [...]
>> Anyhow - just throwing this out there for people to chew on and think about.
>
> Oh, and another problem with this:
>
> About 98-99% of my spam in-stream scores as high, that any such proposal
> results in a useless increase of the score.
>
> The problem lies with the LOW scoring spam. Alas, these do not tend to
> trigger on a solid subset or meta as you proposed. In particular, RBL
> hits are quite rare, even more so for multiple hits. The few rules hit
> by low scorers are quite diverse, which complicates this.
May be spamassassin should create set of tests intended for use before
replying "RCPT TO:" in SMTP session?
[ test based on: sending IP address, envelope sender, envelope
recipient, and name in helo/ehlo ]
Possible "recommended actions": accept, temporary reject, permanent
reject - with choice based on "spam score" *AND* mail source reputation.
Temporary reject in SMTP session should increase chances of DNSBL hits
by reducing "blind spot" period of newly created spam sources.
--
[pl>en: Andrew] Andrzej Adam Filip : anfi@onet.eu
The difference between science and the fuzzy subjects is that science
requires reasoning while those other subjects merely require scholarship.
-- Robert Heinlein
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Tue, 2009-03-03 at 08:32 -0800, Marc Perkel wrote:
> Spamassassin works by adding up points. Rule A is 2 points, Rule B is 2
> points therefore the score is 4 points. But is this the best way to
> score? I don't think so.
[...]
> Anyhow - just throwing this out there for people to chew on and think about.
Oh, and another problem with this:
About 98-99% of my spam in-stream scores as high, that any such proposal
results in a useless increase of the score.
The problem lies with the LOW scoring spam. Alas, these do not tend to
trigger on a solid subset or meta as you proposed. In particular, RBL
hits are quite rare, even more so for multiple hits. The few rules hit
by low scorers are quite diverse, which complicates this.
--
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by Marc Perkel <ma...@perkel.com>.
Justin Mason wrote:
> On Tue, Mar 3, 2009 at 17:40, Marc Perkel <ma...@perkel.com> wrote:
>
>> John Wilcock wrote:
>>
>>> I wonder about the feasibility of a second Bayesian database, using the
>>> same learning mechanism as the current system, but keeping track of rule
>>> combinations instead of keywords.
>>>
>>>
>>>
>> YES! That is something I think is worth trying.
>>
>
> this is worth investigating, I know someone was considering trying it
> in the past. A key aspect apparently is to make a token representing
> the *lack* of a rule hit -- ie. the rule was run, but did not fire.
>
> --j.
>
>
I agree. Make a "rule passed" token as well and feed that data into some
sort of statistical engine to see if we can automatically identify
patterns that are usable.
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by Justin Mason <jm...@jmason.org>.
On Tue, Mar 3, 2009 at 17:40, Marc Perkel <ma...@perkel.com> wrote:
>
>
> John Wilcock wrote:
>>
>> I wonder about the feasibility of a second Bayesian database, using the
>> same learning mechanism as the current system, but keeping track of rule
>> combinations instead of keywords.
>>
>>
>
> YES! That is something I think is worth trying.
this is worth investigating, I know someone was considering trying it
in the past. A key aspect apparently is to make a token representing
the *lack* of a rule hit -- ie. the rule was run, but did not fire.
--j.
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by Marc Perkel <ma...@perkel.com>.
John Wilcock wrote:
>
> I wonder about the feasibility of a second Bayesian database, using
> the same learning mechanism as the current system, but keeping track
> of rule combinations instead of keywords.
>
>
YES! That is something I think is worth trying.
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
> Le 03/03/2009 17:42, Matus UHLAR - fantomas a écrit :
> >I have been already thinking about possibility to combine every two rules
> >and do a masscheck over them. Then, optionally repeating that again,
> >skipping duplicates. Finally gather all rules that scored>=0.5 ||<=-0.5
> >- we could have interesting ruleset here.
> >
> >But that's going to be a HUGE ruleset.
On 03.03.09 18:06, John Wilcock wrote:
> Not to mention that different combinations will suit different sites.
that applies even for basic rules :)
> I wonder about the feasibility of a second Bayesian database, using the
> same learning mechanism as the current system, but keeping track of rule
> combinations instead of keywords.
That would be alternative way of assigning scores.
--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
BSE = Mad Cow Desease ... BSA = Mad Software Producents Desease
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by John Wilcock <jo...@tradoc.fr>.
Le 04/03/2009 10:38, Matus UHLAR - fantomas a écrit :
> I should note that some policy rules and rules with manually updated scores
> (SPF_PASS, BAYES_*) may need to be exempted from this.
> We don't want SPF_PASS to generate high positive score, do we?
It could probably be argued both ways. There might be advantages in
letting the postulated system give a positive boost to high-confidence
spam indicators even if (or perhaps particularly when) they occur in
combination with rules that are low-confidence ham indicators like SPF_PASS.
But I guess these sort of details would need to be investigated by
whoever takes on the task of designing and coding the system. It would
no doubt take some fairly complex statistical analysis of different
possible strategies to implement this idea. I for one have neither the
time nor the expertise, unfortunately, to do much more than express an idea!
John.
--
-- Over 3000 webcams from ski resorts around the world - www.snoweye.com
-- Translate your technical documents and web pages - www.tradoc.fr
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by Marc Perkel <ma...@perkel.com>.
Matus UHLAR - fantomas wrote:
> I should note that some policy rules and rules with manually updated scores
> (SPF_PASS, BAYES_*) may need to be exempted from this.
> We don't want SPF_PASS to generate high positive score, do we?
>
The idea of all this is that we might discover things like SPF_PASS
combined with other rules might be useful where by itself it's not. We
might find ourselves generating more "informational tokens" that by
themselve don't score but are useful in combination with other rules.
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by LuKreme <kr...@kreme.com>.
On 4-Mar-2009, at 02:38, Matus UHLAR - fantomas wrote:
>> LuKreme wrote:
>>> It sounds like a really good idea to me, and also like the most
>>> reasonable way to manage self-learning meta rules.
>
> On 03.03.09 16:43, Marc Perkel wrote:
>> It seems to me that the consensus is that it's worth a try. I don't
>> know
>> if it will work or not but I think there's a good change this could
>> be a
>> significant advancement in how well SA works.
>
> I should note that some policy rules and rules with manually updated
> scores
> (SPF_PASS, BAYES_*) may need to be exempted from this.
> We don't want SPF_PASS to generate high positive score, do we?
You're still thinking linearly. It's not a matter of giving SPF_PASS
a high score, it's a matter of looking at ham and noticing that
SPF_PASS and Bayes_00 and RANDTEST_08 have a ham index of 4% and a
spam index of 0.02% and modifying mail that hits those three test with
a +2.0 to the overall score.
It seems to me that from a programming standpoint, not much needs to
be done. All we need is a second bayes instance that ONLY looks at
the X-Spam-Status line and a news status line X-Spam-Passed which SA
gets patched to add as well. Let bayes run over a large corpus of
mail looking at those two headers and see if it's useful.
--
My mind is going. There is no question about it. I can feel it. I can
feel it. I can feel it. I'm... afraid.
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
> >>Le 03/03/2009 17:42, Matus UHLAR - fantomas a écrit :
> >>>I have been already thinking about possibility to combine every two
> >>>rules and do a masscheck over them. Then, optionally repeating that
> >>>again, skipping duplicates. Finally gather all rules that scored>=0.5
> >>>||<=-0.5 - we could have interesting ruleset here.
> >>>
> >>>But that's going to be a HUGE ruleset.
> >On Mar 3, 2009, at 10:06, John Wilcock <jo...@tradoc.fr> wrote:
> >>Not to mention that different combinations will suit different sites.
> >>
> >>I wonder about the feasibility of a second Bayesian database, using
> >>the same learning mechanism as the current system, but keeping track
> >>of rule combinations instead of keywords.
> LuKreme wrote:
> >It sounds like a really good idea to me, and also like the most
> >reasonable way to manage self-learning meta rules.
On 03.03.09 16:43, Marc Perkel wrote:
> It seems to me that the consensus is that it's worth a try. I don't know
> if it will work or not but I think there's a good change this could be a
> significant advancement in how well SA works.
I should note that some policy rules and rules with manually updated scores
(SPF_PASS, BAYES_*) may need to be exempted from this.
We don't want SPF_PASS to generate high positive score, do we?
--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
M$ Win's are shit, do not use it !
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by decoder <de...@own-hero.net>.
Marc Perkel wrote:
> LuKreme wrote:
>> On Mar 3, 2009, at 10:06, John Wilcock <jo...@tradoc.fr> wrote:
>>
>>> Le 03/03/2009 17:42, Matus UHLAR - fantomas a écrit :
>>>> I have been already thinking about possibility to combine every two
>>>> rules
>>>> and do a masscheck over them. Then, optionally repeating that again,
>>>> skipping duplicates. Finally gather all rules that scored>=0.5
>>>> ||<=-0.5
>>>> - we could have interesting ruleset here.
>>>>
>>>> But that's going to be a HUGE ruleset.
>>>
>>> Not to mention that different combinations will suit different sites.
>>>
>>> I wonder about the feasibility of a second Bayesian database, using
>>> the same learning mechanism as the current system, but keeping track
>>> of rule combinations instead of keywords.
>>
>> It sounds like a really good idea to me, and also like the most
>> reasonable way to manage self-learning meta rules.
>>
> It seems to me that the consensus is that it's worth a try. I don't
> know if it will work or not but I think there's a good change this
> could be a significant advancement in how well SA works.
I had exactly the same idea as Marc quite a while ago, but didn't try it
(yet) because I didn't have a big corpus of false positives/negatives to
test on. Using such a system mainly makes sense to actually improve the
performance, i.e. to minimize false positives and negatives, so one
would need to show that it indeed does improve the performance.
Apart from that, it should be simple using machine learning algorithms
(e.g. Bayes, or even something more complex, like an SVM) to "learn"
meta rules and also reasonably fast once one has the model.
Chris
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by decoder <de...@own-hero.net>.
Marc Perkel wrote:
>
> I suppose what I was thinking was that you still used the SA result
> but added or subtracted from the SA result based on your SVM code,
> sort of the way bayes does. Or are you letting SVM make the final
> determination?
At the moment, I am only using the SVM answer. What you finally do with
it, is the next step. You can use it like a normal rule and give it a
score, of course. You can also only use the SVM, but I think I'll go for
the scoring idea :) It would also be possible to use an SVM model that
supports confidence/probabilities. At the moment I was only evaluating
the precision/recall for this method only without any scorings.
Chris
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by Marc Perkel <ma...@perkel.com>.
decoder wrote:
> Marc Perkel wrote:
>>
>> Good work so far but sounds like you need to throw more data at it.
>> Also even though you indicate "over 99% accuracy" can you break that
>> down better? 99.9% is 10 times as accurate as 99%.
> What do you mean by more data? Of course, some additional data might
> help. One should consider that _most_ of the SA rules are designed to
> score on spam. For an SVM, you can use more general data like "Mail
> has property XYZ" although you don't know what this property means
> (ham or spam) or if it is even suitable to classify anything. This is
> of course an advantage.
>
>
> With respect to the numbers:
>
> I repeated the experiments today with slight modifications to provide
> a more solid setup:
>
> The input is again the dataset I used yesterday. In one run, I
> permutate the dataset, then split it (2/3 training vs. 1/3 testing,
> not stratified).
> Then the training set is used to train an SVM, and it is applied to
> the 1/3 testing set and additionally to my false negatives set.
>
> The SVM outputs an accuracy value, but I wrote a tool that calculates
> precision and recall by hand because these values are more interesting as
>
> 1 - Precision = False Positive Rate (which is an important factor in SA)
> 1 - Recall = False Negative Rate (or, consider recall as the detection
> rate)
>
>
> I ran this 5 times, the output is attached as text file, there you
> will see the exact numbers :)
>
> Taking the mean over the 5 runs:
>
>
> False positive rate: 0.37908199952036 %
> Detection Rate: 99.18104855859372 %
>
> Detection Rate on False Negatives (my SA has 0% on this set):
> 31.7821782178218 %
>
>
> One should consider that my dataset might not be 100% accurate. It is
> combined from my inbox and my spam folder. Of course my spam folder is
> unlikely to contain ham, but it is surely possible that I forgot to
> delete one or another false negative from my inbox. I'm looking
> forward to get Justin's set :)
>
>
>>
>> Also - when it identifies messages do the numbers on the spam scores
>> go up and ham goes down? If so that makes it more solid and starves
>> the middle. I'm encouraged that the initial results are good.
> What do you mean by that question, I don't really understand it :)
>>
>> My feeling is that if this works that it will work better if we have
>> more informational tokens. For example - is the from address a
>> freemail address. Does the message contain a freemail address. By
>> themselves these wouldn't score points. But spam coming from yahoo,
>> hotmail, gmail, etc. is a different kind of spam than spam coming
>> from spambots. Maybe country tokens from the received lines would be
>> useful. Maybe names of banks in the message would be useful. For
>> example Bank of America + Nigeria = spam.
> Yes, this is exactly what I meant above. These tokens are of limited
> use for SA currently, but an SVM might be able to use them :)
>
>
> Cheers,
>
>
> Chris
I suppose what I was thinking was that you still used the SA result but
added or subtracted from the SA result based on your SVM code, sort of
the way bayes does. Or are you letting SVM make the final determination?
In my SA processing I'm used to getting numbers back and processing
different based on the grade of spam/ham. I was envisioning that this
new process would increase the accuracy and starve the middle pushing
the result into bigger ham/spam numbers.
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by decoder <de...@own-hero.net>.
Marc Perkel wrote:
>
> Good work so far but sounds like you need to throw more data at it.
> Also even though you indicate "over 99% accuracy" can you break that
> down better? 99.9% is 10 times as accurate as 99%.
What do you mean by more data? Of course, some additional data might
help. One should consider that _most_ of the SA rules are designed to
score on spam. For an SVM, you can use more general data like "Mail has
property XYZ" although you don't know what this property means (ham or
spam) or if it is even suitable to classify anything. This is of course
an advantage.
With respect to the numbers:
I repeated the experiments today with slight modifications to provide a
more solid setup:
The input is again the dataset I used yesterday. In one run, I permutate
the dataset, then split it (2/3 training vs. 1/3 testing, not stratified).
Then the training set is used to train an SVM, and it is applied to the
1/3 testing set and additionally to my false negatives set.
The SVM outputs an accuracy value, but I wrote a tool that calculates
precision and recall by hand because these values are more interesting as
1 - Precision = False Positive Rate (which is an important factor in SA)
1 - Recall = False Negative Rate (or, consider recall as the detection rate)
I ran this 5 times, the output is attached as text file, there you will
see the exact numbers :)
Taking the mean over the 5 runs:
False positive rate: 0.37908199952036 %
Detection Rate: 99.18104855859372 %
Detection Rate on False Negatives (my SA has 0% on this set):
31.7821782178218 %
One should consider that my dataset might not be 100% accurate. It is
combined from my inbox and my spam folder. Of course my spam folder is
unlikely to contain ham, but it is surely possible that I forgot to
delete one or another false negative from my inbox. I'm looking forward
to get Justin's set :)
>
> Also - when it identifies messages do the numbers on the spam scores
> go up and ham goes down? If so that makes it more solid and starves
> the middle. I'm encouraged that the initial results are good.
What do you mean by that question, I don't really understand it :)
>
> My feeling is that if this works that it will work better if we have
> more informational tokens. For example - is the from address a
> freemail address. Does the message contain a freemail address. By
> themselves these wouldn't score points. But spam coming from yahoo,
> hotmail, gmail, etc. is a different kind of spam than spam coming from
> spambots. Maybe country tokens from the received lines would be
> useful. Maybe names of banks in the message would be useful. For
> example Bank of America + Nigeria = spam.
Yes, this is exactly what I meant above. These tokens are of limited use
for SA currently, but an SVM might be able to use them :)
Cheers,
Chris
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by Marc Perkel <ma...@perkel.com>.
decoder wrote:
> decoder wrote:
>> Justin Mason wrote:
>>>
>>> So you're volunteering to code it up, then? ;)
>>
>> I was planning to do at least some brainstorming+experiements as to
>> what learning methods would seem suitable and how well the method
>> performs, whenever I have time again. Unless someone else did that
>> already?
>>
>
> Ok, I did some short experiments: I've built an SVM classifier from a
> large mail corpus (8226 mails (5414 ham, 2812 spam)) and did a 5-fold
> cross validation. The resulting classifier has an accuracy of over
> 99%, so performs as good as the regular system. Now I applied this to
> a set of 202 False Negatives that I collected, and 69 of these are
> recognized as spam by the SVM. As a second test, I pulled 2707 mails
> from one of my other inboxes and applied the classifier, the accuracy
> was again over 99% (and this is only ham).
>
> From my point of view, the results show that this approach has
> potential. It is highly accurate with respect to the current system,
> but additionally outperformed it on several false negatives.
>
>
> There are other advantages that this system has over the common
> system: It allows everybody to train the whole spamfilter (not only
> Bayes) to the kind of spam that one receives, i.e. it is more adaptive
> than the common system.
>
>
> Any opinions on this are greatly welcome. Maybe we should try to come
> up with a proof of concept plugin for SA?
>
>
Good work so far but sounds like you need to throw more data at it. Also
even though you indicate "over 99% accuracy" can you break that down
better? 99.9% is 10 times as accurate as 99%.
Also - when it identifies messages do the numbers on the spam scores go
up and ham goes down? If so that makes it more solid and starves the
middle. I'm encouraged that the initial results are good.
My feeling is that if this works that it will work better if we have
more informational tokens. For example - is the from address a freemail
address. Does the message contain a freemail address. By themselves
these wouldn't score points. But spam coming from yahoo, hotmail, gmail,
etc. is a different kind of spam than spam coming from spambots. Maybe
country tokens from the received lines would be useful. Maybe names of
banks in the message would be useful. For example Bank of America +
Nigeria = spam.
I'm really glad you're junking on this. I think it will be a breakthrough.
Some of these tokens
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by Justin Mason <jm...@jmason.org>.
On Thu, Mar 5, 2009 at 11:12, decoder <de...@own-hero.net> wrote:
> Justin Mason wrote:
>>
>> Thanks for doing this! couple of q's:
>>
>> 1. I can offer a bigger ham/spam corpus if you'd like to test against
>> that as well;
>> corpora from multiple contributors can sometimes expose training set bias.
>>
>
> That would be cool :) Is this corpus already processed by spamassassin (i.e.
> has SA headers)?
>
> My poc code currently mines only the headers to find out what rules are
> triggered.
yep, it is. OK, let me take a look later on tonight and see if I can make
up a tarball for you...
>> 2. can you test it on spam that scored less than 10 points when it
>> arrived?
>> low-scoring spam is, of course, more useful to hit than stuff that scored
>> highly
>> on the existing rules.
>
> Things like that should be possible easily. I need to check if I have enough
> mails to
> do a sufficiently reliable test here.
cool.
>> 3. does it give an indication of confidence in its results? or just a
>> binary "spam"/"ham"
>> decision?
>
> I'm currently working only with a binary classifier. However, libsvm
> supports
> probability estimates and regression (and to my knowledge, internally, most
> SVM algorithms relax classification output to real values and then use the
> sign
> to determine the classification, this can also be seen as some sort of
> confidence value)
yep, that should work.
>> 4. hey, if you're writing an SVM plugin, it might be worth making one
>> that _also_
>> supports body text tokens, similarly to the existing Bayes plugin. ;)
>>
>
> This would surely be possible somehow, but we'd first have to come up with a
> good
> representation of the problem for an SVM. I wouldn't want to mix this either
> with the
> current experiment, as these two things somehow represent different data.
>
> One of the problems with text tokens is that there can always be new ones
> (which would
> increase the dimension of the problem and hence require the whole SVM to be
> remodeled,
> so, a system as performant as bayes might not work directly.)
interesting, I hadn't thought of that angle.
--j.
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by decoder <de...@own-hero.net>.
Justin Mason wrote:
>
> Thanks for doing this! couple of q's:
>
> 1. I can offer a bigger ham/spam corpus if you'd like to test against
> that as well;
> corpora from multiple contributors can sometimes expose training set bias.
>
That would be cool :) Is this corpus already processed by spamassassin
(i.e. has SA headers)?
My poc code currently mines only the headers to find out what rules are
triggered.
> 2. can you test it on spam that scored less than 10 points when it arrived?
> low-scoring spam is, of course, more useful to hit than stuff that scored highly
> on the existing rules.
>
Things like that should be possible easily. I need to check if I have
enough mails to
do a sufficiently reliable test here.
> 3. does it give an indication of confidence in its results? or just a
> binary "spam"/"ham"
> decision?
>
I'm currently working only with a binary classifier. However, libsvm
supports
probability estimates and regression (and to my knowledge, internally, most
SVM algorithms relax classification output to real values and then use
the sign
to determine the classification, this can also be seen as some sort of
confidence value)
> 4. hey, if you're writing an SVM plugin, it might be worth making one
> that _also_
> supports body text tokens, similarly to the existing Bayes plugin. ;)
>
This would surely be possible somehow, but we'd first have to come up
with a good
representation of the problem for an SVM. I wouldn't want to mix this
either with the
current experiment, as these two things somehow represent different data.
One of the problems with text tokens is that there can always be new
ones (which would
increase the dimension of the problem and hence require the whole SVM to
be remodeled,
so, a system as performant as bayes might not work directly.)
> 5. btw one particularly tricky part of dealing with user-trainable
> dbs, is supporting
> expiry of old tokens. but that can be deferred until later anyway.
>
I guess this is a question of implementation :)
Best regards,
Chris
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by Justin Mason <jm...@jmason.org>.
On Thu, Mar 5, 2009 at 00:23, decoder <de...@own-hero.net> wrote:
> decoder wrote:
>> Justin Mason wrote:
>>> So you're volunteering to code it up, then? ;)
>>
>> I was planning to do at least some brainstorming+experiements as to what
>> learning methods would seem suitable and how well the method performs,
>> whenever I have time again. Unless someone else did that already?
>>
>
> Ok, I did some short experiments: I've built an SVM classifier from a large
> mail corpus (8226 mails (5414 ham, 2812 spam)) and did a 5-fold cross
> validation. The resulting classifier has an accuracy of over 99%, so
> performs as good as the regular system. Now I applied this to a set of 202
> False Negatives that I collected, and 69 of these are recognized as spam by
> the SVM. As a second test, I pulled 2707 mails from one of my other inboxes
> and applied the classifier, the accuracy was again over 99% (and this is
> only ham).
>
> From my point of view, the results show that this approach has potential. It
> is highly accurate with respect to the current system, but additionally
> outperformed it on several false negatives.
>
>
> There are other advantages that this system has over the common system: It
> allows everybody to train the whole spamfilter (not only Bayes) to the kind
> of spam that one receives, i.e. it is more adaptive than the common system.
>
>
> Any opinions on this are greatly welcome. Maybe we should try to come up
> with a proof of concept plugin for SA?
Thanks for doing this! couple of q's:
1. I can offer a bigger ham/spam corpus if you'd like to test against
that as well;
corpora from multiple contributors can sometimes expose training set bias.
2. can you test it on spam that scored less than 10 points when it arrived?
low-scoring spam is, of course, more useful to hit than stuff that scored highly
on the existing rules.
3. does it give an indication of confidence in its results? or just a
binary "spam"/"ham"
decision?
4. hey, if you're writing an SVM plugin, it might be worth making one
that _also_
supports body text tokens, similarly to the existing Bayes plugin. ;)
5. btw one particularly tricky part of dealing with user-trainable
dbs, is supporting
expiry of old tokens. but that can be deferred until later anyway.
--j.
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by John Hardin <jh...@impsec.org>.
On Thu, 5 Mar 2009, decoder wrote:
> John Hardin wrote:
>> Would there be any benefit to having an offline version - i.e.
>> something that evaluates the log or a corpus to generate new meta
>> rules, that could be added onto the default ruleset? For instance:
>>
>> cron @ 0200:
>> sa_meta_eval > /etc/mail/spamassassin/metarules.cf
>> /etc/init.d/spamassassin restart
>
> This is definetly a good idea. You can create the SVM model offline from
> a logfile only, if it includes the rules that scored and the ham/spam
> status.
>From my /var/log/maillog:
Mar 1 04:22:22 ga spamd[30536]: spamd: result: Y 46 -
BAYES_99,BAYES_POISON_02,DNS_FROM_RFC_ABUSE,DNS_FROM_RF
C_POST,FORGED_MUA_OUTLOOK,FORGED_OUTLOOK_HTML,FORGED_OUTLOOK_TAGS,FORGED_RCVD_HELO,FREEMAIL_FROM,FROM_ILLEGAL_
CHARS,HTML_40_50,HTML_FONT_INVISIBLE,HTML_MESSAGE,L_SOME_STD_PROBS,MIME_BOUND_DD_DIGITS,MIME_HTML_ONLY,MIME_HT
ML_ONLY_MULTI,MISSING_MIMEOLE,RBL_PSBL_01,RCVD_BY_IP,RCVD_DOUBLE_IP_SPAM,RCVD_HELO_IP_MISMATCH,RCVD_NUMERIC_HE
LO,SARE_RECV_IP_FROMIP1,SPF_SOFTFAIL,SUBJ_ILLEGAL_CHARS,UNPARSEABLE_RELAY,UPPERCASE_50_75
scantime=9.4,size=3150,user=root,uid=99,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=40282,mid=<KGNPKZIWNMHBPXAQXUKDUC
K.UQKKAJgreg_jimmy@msn.com>,bayes=1,autolearn=disabled
Unfortunately, only using the log won't let you address FPs and FNs, so in
addition to the log you'd need to be able to scan corpa. I'd suggest that
you do both, and have it prefer the per-message spam/ham status from the
corpa over the spam/ham status from the log (matching by MSGID of course).
> However, you cannot generate metarules with SVMs, for that purpose you
> need a different learning algorithm (for example bayes, or decision
> trees).
>
> However, SVM classification is very cheap, so once you created the model
> offline, you can use it online really quickly with a plugin.
Then perhaps we're looking at two different but related tools, a plugin
for SVMs and an offline static meta rule generator. They may be
complimentary, or they may be different ways to achieve similar results.
Personally I know I'd be more comfortable (at least at this point) running
an offline metarule generator as part of my nightly bayes training script
than I would be in adding another plugin, which is why I brought it up.
Add to that, the offline meta rule generator would be useful in older SA
installs that might not support a plugin written to the current API...
--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
jhardin@impsec.org FALaholic #11174 pgpk -a jhardin@impsec.org
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
Failure to plan ahead on someone else's part does not constitute
an emergency on my part. -- David W. Barts in a.s.r
-----------------------------------------------------------------------
3 days until Daylight Saving Time begins in U.S. - Spring Forward
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by decoder <de...@own-hero.net>.
Marc Perkel wrote:
> So - making any progress? :)
Yes, indeed. I am currently rewriting my code to be more generic and
cleaner (you wouldn't want to see my initial poc code^^). Once I'm done
with that, I can quickly repeat some of the experiments on other mail
sets, such as the one that Justin sent me. After that, I'll write a
small plugin for SA, so you guys can test around with it (that shouldn't
be a big deal).
Chris
P.S.: If you want to provide me another ham/spam corpus or even a
collection of false negatives, feel free to contact me :)
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by Marc Perkel <ma...@perkel.com>.
So - making any progress? :)
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by Justin Mason <jm...@jmason.org>.
On Wed, Mar 11, 2009 at 16:34, decoder <de...@own-hero.net> wrote:
> John Hardin wrote:
>>
>> Chris:
>>
>> Do you have any interest in writing an offline tool that generates static
>> metarules based on the SA log and FP/FN corpa, as I mentioned?
>
> Running some experiments for this kind of tool is at least on my todo list
> :) I don't know however, when I will have time to do that :)
and btw as noted, masses/evolve-metarules does just that. So the
code is written!
--j.
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by decoder <de...@own-hero.net>.
John Hardin wrote:
>
> Chris:
>
> Do you have any interest in writing an offline tool that generates
> static metarules based on the SA log and FP/FN corpa, as I mentioned?
Running some experiments for this kind of tool is at least on my todo
list :) I don't know however, when I will have time to do that :)
Cheers,
Chris
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by decoder <de...@own-hero.net>.
John Hardin wrote:
> Would there be any benefit to having an offline version - i.e.
> something that evaluates the log or a corpus to generate new meta
> rules, that could be added onto the default ruleset? For instance:
>
> cron @ 0200:
> sa_meta_eval > /etc/mail/spamassassin/metarules.cf
> /etc/init.d/spamassassin restart
>
This is definetly a good idea. You can create the SVM model offline from
a logfile only, if it includes the rules that scored and the ham/spam
status. However, you cannot generate metarules with SVMs, for that
purpose you need a different learning algorithm (for example bayes, or
decision trees).
However, SVM classification is very cheap, so once you created the model
offline, you can use it online really quickly with a plugin.
Cheers,
Chris
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by decoder <de...@own-hero.net>.
decoder wrote:
> Justin Mason wrote:
>>
>> So you're volunteering to code it up, then? ;)
>
> I was planning to do at least some brainstorming+experiements as to
> what learning methods would seem suitable and how well the method
> performs, whenever I have time again. Unless someone else did that
> already?
>
Ok, I did some short experiments: I've built an SVM classifier from a
large mail corpus (8226 mails (5414 ham, 2812 spam)) and did a 5-fold
cross validation. The resulting classifier has an accuracy of over 99%,
so performs as good as the regular system. Now I applied this to a set
of 202 False Negatives that I collected, and 69 of these are recognized
as spam by the SVM. As a second test, I pulled 2707 mails from one of my
other inboxes and applied the classifier, the accuracy was again over
99% (and this is only ham).
From my point of view, the results show that this approach has
potential. It is highly accurate with respect to the current system, but
additionally outperformed it on several false negatives.
There are other advantages that this system has over the common system:
It allows everybody to train the whole spamfilter (not only Bayes) to
the kind of spam that one receives, i.e. it is more adaptive than the
common system.
Any opinions on this are greatly welcome. Maybe we should try to come up
with a proof of concept plugin for SA?
Best regards,
Chris
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by decoder <de...@own-hero.net>.
Justin Mason wrote:
>
> So you're volunteering to code it up, then? ;)
I was planning to do at least some brainstorming+experiements as to what
learning methods would seem suitable and how well the method performs,
whenever I have time again. Unless someone else did that already?
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by decoder <de...@own-hero.net>.
Marc Perkel wrote:
>
> Justin Mason wrote:
>>>
>> So you're volunteering to code it up, then? ;)
>>
>> --j.
>>
>>
> I would if I were any good at perl.
I think we should evaluate if the suggested technique works and performs
better or is at least of some benefit, before trying to implement it
properly as a plugin. Such a test can be done offline with spam/ham
easily... I started writing a script that mines some of my spam and ham,
and then I'll evaluate how good the classifiers are that I get.
Cheers,
Chris
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by Marc Perkel <ma...@perkel.com>.
Justin Mason wrote:
> On Wed, Mar 4, 2009 at 00:43, Marc Perkel <ma...@perkel.com> wrote:
>
>> LuKreme wrote:
>>
>>> On Mar 3, 2009, at 10:06, John Wilcock <jo...@tradoc.fr> wrote:
>>>
>>>
>>>> Le 03/03/2009 17:42, Matus UHLAR - fantomas a écrit :
>>>>
>>>>> I have been already thinking about possibility to combine every two
>>>>> rules
>>>>> and do a masscheck over them. Then, optionally repeating that again,
>>>>> skipping duplicates. Finally gather all rules that scored>=0.5 ||<=-0.5
>>>>> - we could have interesting ruleset here.
>>>>>
>>>>> But that's going to be a HUGE ruleset.
>>>>>
>>>> Not to mention that different combinations will suit different sites.
>>>>
>>>> I wonder about the feasibility of a second Bayesian database, using the
>>>> same learning mechanism as the current system, but keeping track of rule
>>>> combinations instead of keywords.
>>>>
>>> It sounds like a really good idea to me, and also like the most reasonable
>>> way to manage self-learning meta rules.
>>>
>>>
>> It seems to me that the consensus is that it's worth a try. I don't know if
>> it will work or not but I think there's a good change this could be a
>> significant advancement in how well SA works.
>>
>
> So you're volunteering to code it up, then? ;)
>
> --j.
>
>
I would if I were any good at perl.
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by Justin Mason <jm...@jmason.org>.
On Wed, Mar 4, 2009 at 00:43, Marc Perkel <ma...@perkel.com> wrote:
> LuKreme wrote:
>>
>> On Mar 3, 2009, at 10:06, John Wilcock <jo...@tradoc.fr> wrote:
>>
>>> Le 03/03/2009 17:42, Matus UHLAR - fantomas a écrit :
>>>>
>>>> I have been already thinking about possibility to combine every two
>>>> rules
>>>> and do a masscheck over them. Then, optionally repeating that again,
>>>> skipping duplicates. Finally gather all rules that scored>=0.5 ||<=-0.5
>>>> - we could have interesting ruleset here.
>>>>
>>>> But that's going to be a HUGE ruleset.
>>>
>>> Not to mention that different combinations will suit different sites.
>>>
>>> I wonder about the feasibility of a second Bayesian database, using the
>>> same learning mechanism as the current system, but keeping track of rule
>>> combinations instead of keywords.
>>
>> It sounds like a really good idea to me, and also like the most reasonable
>> way to manage self-learning meta rules.
>>
> It seems to me that the consensus is that it's worth a try. I don't know if
> it will work or not but I think there's a good change this could be a
> significant advancement in how well SA works.
So you're volunteering to code it up, then? ;)
--j.
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by Marc Perkel <ma...@perkel.com>.
LuKreme wrote:
> On Mar 3, 2009, at 10:06, John Wilcock <jo...@tradoc.fr> wrote:
>
>> Le 03/03/2009 17:42, Matus UHLAR - fantomas a écrit :
>>> I have been already thinking about possibility to combine every two
>>> rules
>>> and do a masscheck over them. Then, optionally repeating that again,
>>> skipping duplicates. Finally gather all rules that scored>=0.5 ||<=-0.5
>>> - we could have interesting ruleset here.
>>>
>>> But that's going to be a HUGE ruleset.
>>
>> Not to mention that different combinations will suit different sites.
>>
>> I wonder about the feasibility of a second Bayesian database, using
>> the same learning mechanism as the current system, but keeping track
>> of rule combinations instead of keywords.
>
> It sounds like a really good idea to me, and also like the most
> reasonable way to manage self-learning meta rules.
>
It seems to me that the consensus is that it's worth a try. I don't know
if it will work or not but I think there's a good change this could be a
significant advancement in how well SA works.
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by LuKreme <kr...@kreme.com>.
On Mar 3, 2009, at 10:06, John Wilcock <jo...@tradoc.fr> wrote:
> Le 03/03/2009 17:42, Matus UHLAR - fantomas a écrit :
>> I have been already thinking about possibility to combine every two
>> rules
>> and do a masscheck over them. Then, optionally repeating that again,
>> skipping duplicates. Finally gather all rules that scored>=0.5 ||
>> <=-0.5
>> - we could have interesting ruleset here.
>>
>> But that's going to be a HUGE ruleset.
>
> Not to mention that different combinations will suit different sites.
>
> I wonder about the feasibility of a second Bayesian database, using
> the same learning mechanism as the current system, but keeping track
> of rule combinations instead of keywords.
It sounds like a really good idea to me, and also like the most
reasonable way to manage self-learning meta rules.
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by John Wilcock <jo...@tradoc.fr>.
Le 03/03/2009 17:42, Matus UHLAR - fantomas a écrit :
> I have been already thinking about possibility to combine every two rules
> and do a masscheck over them. Then, optionally repeating that again,
> skipping duplicates. Finally gather all rules that scored>=0.5 ||<=-0.5
> - we could have interesting ruleset here.
>
> But that's going to be a HUGE ruleset.
Not to mention that different combinations will suit different sites.
I wonder about the feasibility of a second Bayesian database, using the
same learning mechanism as the current system, but keeping track of rule
combinations instead of keywords.
John.
--
-- Over 3000 webcams from ski resorts around the world - www.snoweye.com
-- Translate your technical documents and web pages - www.tradoc.fr
Re: 2 + 2 != 4 - Spamassassin needs a new paradigm
Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
On 03.03.09 08:32, Marc Perkel wrote:
> Spamassassin works by adding up points. Rule A is 2 points, Rule B is 2
> points therefore the score is 4 points. But is this the best way to
> score? I don't think so.
>
> What I'm seeing in the real world is that it's the combinations of rules
> in ways where Rule A + Rule B = 10 points rather than 4. Or maybe Rule A
> + Rule B = -2 points because even though both are spam indicators
> individually, together that are a ham indicator.
Yes, and that's what meta rules are for.
> As an example. The following by themselves are week indicators of spam.
>
> Dynamic IP
> Bad HELO
> Hitting high numbers MX records
> Not closing with QUIT
>
> By themselves each would produce a LOT of false positives. But together
> it's 100% definite it's a spam bot and not only can the message be
> rejected, but the IP can be blacklisted. Another example. You do an RBL
> lookup and the IP is listed in:
>
> RBL-A 0.5
> RBL-B 0.5
> RBL-C 0.5
>
> Score = 1.5 - NO - Score = 5! Usually multiple RBLs is a stronger
> indicator than the sum of the scores. But suppose you find the IP listed
> in the Hostkarma yellow list (yellow means mixed source of spam such as
> yahoo, gmail, and hotmail) then the RBLs don't matter. In the above
> example, say the 3 RBLs are US based and the spam is coming from
> yahoo.fr. Most everything coming from yahoo France to American users is
> spam and might get listed on low quality RBLs. But my point is that you
> wouldn't want to assign a negative score for the yellow listing because
> yellow doesn't mean it's not spam, it means it shouldn't be blacklisted.
> The better logic is - if not yellow then add up the black scored. (A + B
> + C) * !yellow. Better to look up yellow first and then skip the RBLs if
> found.
>
> The important point here is that SA needs to evolve beyond the concept
> of using addition to compute scores. Ideally there should be more hard
> coded rule combinations or using baysian statistics to find how rule
> combinations where the combinations are a more accurate indication than
> the rules themselves.
>
> Anyhow - just throwing this out there for people to chew on and think about.
I have been already thinking about possibility to combine every two rules
and do a masscheck over them. Then, optionally repeating that again,
skipping duplicates. Finally gather all rules that scored >=0.5 || <=-0.5
- we could have interesting ruleset here.
But that's going to be a HUGE ruleset.
--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
There's a long-standing bug relating to the x86 architecture that
allows you to install Windows. -- Matthew D. Fuller