Julian Kippels wrote:
Hi,
I am in the process of setting up a bayes-sql-database but I am unsure
of wether I want to set the bayes_sql_override_username option.
I would like to have per-user-bayes scores, so that scores from user A
will not interfere with messages sent to user B.
If I understand it correctly, no matter what I use as the username for
sa-learn, this option when set will override it with whatever I put
there. Does this not effectivly disable per-user-bayes scores and
bundles them all under one meta-user?
However I have read, when using amavis (which I do) to call SA, I
should set this variable to the username which runs the amavis process.
What should I do?
You're getting two similarly-named but unrelated options confused.
bayes_sql_override_username explicitly and specifically disables the
per-user Bayes DB setup you're asking for. (IMO this is of limited use
at any scale larger than "a handful of technically minded users", but it
*can* work as long as your users are willing to feed the system. For
most other setups you're going to get better results by using a single,
centrally-maintained site-wide Bayes database.)
The option you're probably looking for is "bayes_sql_username" (and the
related bayes_sql_dsn and bayes_sql_password). This sets the SQL
connection user - not the SA/Bayes user! - which is what you need if you
want to keep many per-user Bayes datasets in an SQL database instead of
one of the other backends.
Calling SpamAssassin from Amavis or some other glue layer that operates
during the same part of mail flow means that it's sometimes extremely
difficult to make use of per-user Bayes and other settings, because you
have one message with many recipients. Full per-user SA settings are
IMO best handled by calling SA on final mail delivery, where you are
guaranteed to be calling SA for exactly one recipient on any given call.
The downside of this method is that if a message originally had
multiple recipients, SA will be called for each of those recipients.
-kgd