mysql userpref
Damian
amavis at arcsin.de
Mon Nov 28 19:22:59 CET 2022
> 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 at 752bab637002:~# echo SELECT * FROM userpref | mysql spamassassin
> username preference value prefid
> demo at example.com required_score 4.4 3
and
> root at 752bab637002:~# cat /etc/amavis/conf.d/60-demo
> @spam_kill_level_maps = {
> 'demo2 at example.com' => 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 demo at example.com,
> X-Spam-Status: Yes, score=999.998 tag=2 tag2=6.31 kill=303
> tests=[GTUBE=1000,
for other at example.com, and
> X-Spam-Status: Yes, score=999.998 tag=2 tag2=6.31 kill=42
> tests=[GTUBE=1000,
for demo2 at example.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.amavis.org/pipermail/amavis-users/attachments/20221128/0b1f0293/attachment.htm>
More information about the amavis-users
mailing list