Re: mysql userpref
Damian <[email protected]>
| Newsgroups | gmane.mail.virus.amavis.user |
|---|---|
| Message-ID | <[email protected]> |
> I read it and unfortunately I still don't know how to set it up. > @lookup_sql_dsn i have set for vmail database. > Please write how to make amavis read "required_score" from database > "spamassassin" from table "userpref" and if it finds a user let it use > individual spam threshold "value". Something for you to play around with: > root@752bab637002:~# echo SELECT * FROM userpref | mysql spamassassin > username preference value prefid > [email protected] required_score 4.4 3 and > root@752bab637002:~# cat /etc/amavis/conf.d/60-demo > @spam_kill_level_maps = { > '[email protected]' => 42, > '.' => 303, > }; > > %sql_clause = ( > sel_policy => 'SELECT value AS spam_kill_level FROM userpref WHERE > preference = "required_score" AND username = %a', > ); yield > X-Spam-Status: Yes, score=999.998 tag=2 tag2=6.31 kill=4.4 > tests=[GTUBE=1000, for [email protected], > X-Spam-Status: Yes, score=999.998 tag=2 tag2=6.31 kill=303 > tests=[GTUBE=1000, for [email protected], and > X-Spam-Status: Yes, score=999.998 tag=2 tag2=6.31 kill=42 > tests=[GTUBE=1000, for [email protected].