ÐÐÐÐÐÐÐ ÐÐÑÐÐÐÐÐ wrote:
> Matt Kettler wrote:
> 
>> ÐÐÐÐÐÐÐ ÐÐÑÐÐÐÐÐ wrote:
>>  
>>
>>>>
>>>>
>>>>     
>>>
>>> I understood the problem. Amavisd starts spamassassin with user cyrus.
>>> I'm learning spamassassin under each user with sa-learn option -u.
>>> I just wanted that each user had it's own spam base. Then I don't
>>> understand for what purposes option -u is used.
>>>   
>>
>>
>> -u should work for that, but only if you're using a virtual
>> configuration such
>> as SQL.
>>
>> One thing that's a bit confusing is your local.cf has a bayes_path
>> statement in
>> it, but also SQL statements.
>>
>> try running sa-learn with debugging enabled (-D):
>>
>> sa-learn --dump magic -D   
>>
>> And see if SA is correctly using SQL or not. If it's not using SQL,
>> then the -u
>> will be unused.
>>
>>  
>>
> I've tried that:
> 
> /usr/local/bin/sa-learn -u [EMAIL PROTECTED] --dump magic -D --spam
> /home/cyrus/spool/domain/domain.ru/user/evgeny/IsSpam
> 
> 
> the result is:
> bla-bla-bla....
> debug: bayes: Using username: [EMAIL PROTECTED]
> debug: bayes: Database connection established
> debug: bayes: found bayes db version 3
> debug: bayes: Using userid: 3
> debug: Score set 2 chosen.
> 0.000          0          3          0  non-token data: bayes db version
> 0.000          0       1046          0  non-token data: nspam
> 0.000          0       1020          0  non-token data: nham
> 0.000          0     147652          0  non-token data: ntokens
> 0.000          0 1104925714          0  non-token data: oldest atime
> 0.000          0 1116239222          0  non-token data: newest atime
> 0.000          0          0          0  non-token data: last journal
> sync atime
> 0.000          0 1115971232          0  non-token data: last expiry atime
> 0.000          0   11059200          0  non-token data: last expire
> atime delta
> 0.000          0      26201          0  non-token data: last expire
> reduction count
> 
> It seems that sa-learn connects to MySQL. There are a lot of records in
> table bayes_vars. But SpamAssassin connects to MySQL and uses only
> records for user cyrus.
> How should I deal with that?

At this point, it's more of an amavisd question.

It's not up to spamassassin to decide what user's bayes DB to access.
SpamAssassin does not EVER, under any condition, read the To: header to figure
out who's bayes DB to use. It's entirely up to the tool calling spamassassin to
specify this.


Amavisd may not even support anything but one user. At which point, you'll have
to pass -u cyrus to your training and be done with it.


Reply via email to