only white_black_list in mysql

Toni Schornböck via amavis-users amavis-users at
Fri Sep 20 11:25:17 CEST 2013


I figured it out.
The problem seems to be $sql_select_policy - this query must return some
special values otherwise no more queries will be run.

So I now have in amavisd.conf

$sql_select_white_black_list = 'SELECT sum(`score`) as `wb` from
`white_black_list` where `email` in (%k)';
$sql_select_policy = 'SELECT 1 as id, 1 as priority, 0 as policy_id, "@."
as email, "Y" as fullname';

and now both queries are run and my softscoring can be put into a mysql

So my question is now: is this a correct solution? It seems kind of hacky
to do this with a fake query - is there a better way to do?
I also tried using q_sql_n() in @score_sender_maps - but I wasn't able to
get this to work (there is hardly any documentation).

Thanks in advance,
Toni Schornböck

More information about the amavis-users mailing list