On 24-Sep-2009, at 15:39, Kris Deugau wrote:

LuKreme wrote:

Does using MySQL bayes allow you to fake per-user bayes with MySQL- based users?

Mmm, after rereading this a few times I'm not sure what you're asking. By default it's per-user; each calling user passed by spamc or spamassassin is a "user" in the context of SpamAssassin. There's an "extra" table in the SQL defs (bayes_vars) that maps the calling user to an "id" field in the token table.

OK, currently all of my MySQL managed users are in /usr/local/virtual and all their mail belongs to the system users vpopmail. When I run bayes for those users, it all is added to the 'sitewide' bayes. I put sitewide in quotes because it is not really sitewide, it is vpopmail user wide, but since the majority of users are MySQL, they all share one database.

We've overridden this with bayes_sql_override_username to make it sitewide, since per-user Bayes tuning is.... not gonna happen in a general ISP environment.

If you're looking to actually use different SQL users for each SA user... don't think that's possible at all with stock SA.

No, what I was hoping was possible was something like this:

CREATE TABLE `bayes_seen` )
 `id` int(11) NOT NULL DEFAULT '0',
`msgid` varchar(200) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
 `flag` char(1) NOT NULL DEFAULT '',
`lastupdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `bayes_user` varchar(256) CHARACTER SET latin1 COLLATE latin1_bin NO NULL DEFAULT '[email protected]',
 PRIMARY KEY (`id`,`msgid`)
)

Where that bayes_user let me store the email address for the MySQL/ postfixadmin users individually.

So, if I have [email protected] and [email protected] their bayes would be saved and checked versus only their own data.

Make sense?

--
Commander: "Seems odd you'd name your ship after a battle
        you were on the wrong side of."
Mal: "May have been the losing side. Still not convinced
        it was the wrong one."

Reply via email to