Bug 5183 - BayesStore/SQL.pm proposed update.
Summary: BayesStore/SQL.pm proposed update.
Status: NEW
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: spamassassin (show other bugs)
Version: 3.1.4
Hardware: PC Linux
: P5 enhancement
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-13 05:05 UTC by Cedric Lejeune
Modified: 2008-04-23 10:17 UTC (History)
2 users (show)



Attachment Type Modified Status Actions Submitter/CLA Status
Proposed updated Conf.pm. patch None Cedric Lejeune [NoCLA]
Proposed updated BayesStore/SQL.pm. patch None Cedric Lejeune [NoCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Cedric Lejeune 2006-11-13 05:05:26 UTC
Hello!

As suggested on dev mailing list, I open a "bug" report. Please, find the
original message below.

Thanks,

cedric.

-------------------------------------------------------------------------------

Hi list!

First, this is my first submission to a project, so please excuse me if I do
something that do not follow the rules.

I'm in charged with spamassassin (SA) and after an update from 3.0 to 3.1, users
starts to complain about SA improved effectiveness (to more false positive).
After some investigation, the problem seems to come from bayesian filter. I use
a global bayesian database (using bayes_sql_override_username) but with
customers coming from all over the world, it seems a more fine grain filtering
should be better. But it seems it is currently impossible. I use SQL bayesian
database setup and it should have been great if it has offered the same kind of
feature that user_scores_sql_custom_query. What I wanted to do is make bayesian
filter retrieve database first for the current user, then for the routing domain
to which user belongs to, then fall back to global database. For instance:

toto@foo.bar -> *@foo.bar -> *

This way, it is possible for users to have their own personal bayes database and
if they do no want to create one or they do no have one already, they still can
benefit from others' databases. Grouping users per routing domain is like
grouping users per center of interest: if one declares mail as spam, there is
little few chance that others consider it as ham.

So this feature was not implemented yet and I have started writing it myself. I
warn you that I did not write a single perl line before and "my" code is made of
doc quotes and cut & paste. I've added the following configuration option
bayes_sql_custom_query to SA configuration file. It acts the same way
bayes_sql_override_username does.

Please, let me know if this feature could be useful to others and/or if it
requires some rewriting.

Please, find diff as attachments. They applied against SA 3.1.4 because it is
the SA version shipped with Debian testing at this time.

Best regards =)

cedric.
Comment 1 Cedric Lejeune 2006-11-13 05:07:57 UTC
Created attachment 3749 [details]
Proposed updated Conf.pm.
Comment 2 Cedric Lejeune 2006-11-13 05:08:53 UTC
Created attachment 3750 [details]
Proposed updated BayesStore/SQL.pm.
Comment 3 Michael Parker 2006-11-13 13:17:18 UTC
I'm -1 on the change as is.

Create a new, separate BayesStore with this behavior and I think we can get it
in pretty easily.