Jorge Cardona wrote:
> Hi.
> I got a question about this parameter, the spamassassin documentation
> tells this:
> 
> 1) Current default query:
>    SELECT preference, value FROM _TABLE_ WHERE username = _USERNAME_
> OR username = '@GLOBAL' ORDER BY username ASC
> 
> 2) Use global and then domain level defaults:
>    SELECT preference, value FROM _TABLE_ WHERE username = _USERNAME_
> OR username = '@GLOBAL' OR username = '@~'||_DOMAIN_ ORDER BY username
> ASC
> 
> 3) Maybe global prefs should override user prefs:
>    SELECT preference, value FROM _TABLE_ WHERE username = _USERNAME_
> OR username = '@GLOBAL' ORDER BY username DESC
> 
> In 1) and 3) is possible that the query return a table with 2 users
> ,@GLOBAL, and the user that call spamassassin, what i understand it's
> that SA only use the preferences for the first user , thats why in 3)
> the global overrride the user prefs ("ORDER BY username DESC").
> 
> What i can't understand is whats do the 2) query, and also his
> description, "Use global and then domain level defaults" .
> Spamassassin use all the prefs from the @GLOBAL and work with it, and
> after that use the Domains prefs and wort again, thats what its does?
> or take the @GLOBAL prefs, and then override the prefs with the
> Domains prefs.?
> 
> Please, can anyone explain to me this?

They override each other, so for instance lets say you do a query and
get back something like this:

@GLOBAL score FOO 50
@-example.com score FOO 75
[EMAIL PROTECTED] score FOO 1

The score for FOO would go from 50 to 75 to finally 1.

Its just like you wrote the following lines in a .cf file:

score FOO 50
score FOO 75
score FOO 1

score FOO 1 would win because it was the last one parsed.  The text
selected by the SQL query is simply feed into the config parser just as
it had been read from a file.

Michael


> 
> Forgive me if the answer it obvious, i really need to be sure with this.
> 
> 

Reply via email to