mysql lookups - messages with score less than 0 are blocked as spam

Jozef Matický cibula at
Tue Dec 13 16:20:50 CET 2016


I have an amavisd-new (currently 2.8.1) with SA (currently 3.4.0) 
running for couple of years now and the same thing started happening to 
me today. It did work okay just couple of days ago. Not sure what the 
problem is, but it is the same as Dmitriy is describing:

- Amavis is able to connect to MySQL
- SQL query is working okay and returning correct values from database
- Amavis is getting most of the results okay -> settings like 
spam_lover, virus_lover etc, however the values for scores are all zero (0):

sql: preparing and executing (5 args): SELECT 
*,, AS sa_username FROM 
mail_users,mail_policy WHERE (mail_users.policy_id = AND 
( IN (?,?,?,?,?)) ORDER BY
Dec 13 13:21:51 hostname amavis[27181]: (27181-01) 
lookup_sql(redacted at redacted.tld) matches, result=(id=>"28", 
user_id=>"1001", domain_id=>"20", policy_id=>"26", name=>"Default", 
description=>"", home=>"/srv/mail", maildir=>"redacted.tld/redacted", 
password=>"hidden", quota=>"0", used=>"0", id=>"28", user_id=>"1001", 
name=>"Default", description=>"", virus_lover=>"N", spam_lover=>"Y", 
banned_files_lover=>"Y", bad_header_lover=>"Y", 
bypass_virus_checks=>"N", bypass_spam_checks=>"N", 
bypass_banned_checks=>"N", bypass_header_checks=>"N", 
spam_tag_level=>"0", spam_tag2_level=>"0", spam_kill_level=>"0", 
message_size_limit=>"0", spam_subject_tag2=>"", id=>"28", 
sa_username=>"redacted at redacted.tld")

This is with manual query taken from MySQL query log:
Neznámá tabulka 
28;1001;20;26;redacted at redacted.tld;;/srv/mail;redacted.tld/redacted;hidden;0;0;26;1001;Default;;N;Y;Y;Y;N;N;N;N;-100;6.2;20;0;;28;redacted at redacted.tld

As stated before, it started today or maybe yesterday. Not sure if I 
reloaded amavisd recently. Last amavisd update was back in August and SA 
in May, however I can't tell if amavisd was reloaded back then. I did 
some Perl library updates as recommended by the packaging system couple 
of days ago, however nothing major.
Pretty much I had to configure amavisd with SA static scores for now 
since most of the mail went to Spam folder with scores set to 0 instead 
of around 6 (X-Spam-Status: Yes, score=0.863 tagged_above=0 required=0).

Any clues what might be wrong?

Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the amavis-users mailing list