<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
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:<br>
<br>
- Amavis is able to connect to MySQL<br>
- SQL query is working okay and returning correct values from
database<br>
- Amavis is getting most of the results okay -> settings like
spam_lover, virus_lover etc, however the values for scores are all
zero (0):<br>
<br>
sql: preparing and executing (5 args): SELECT
*,mail_users.id,mail_users.name AS sa_username FROM
mail_users,mail_policy WHERE (mail_users.policy_id = mail_policy.id)
AND (mail_users.name IN (?,?,?,?,?)) ORDER BY mail_users.id<br>
Dec 13 13:21:51 hostname amavis[27181]: (27181-01)
lookup_sql(<a class="moz-txt-link-abbreviated" href="mailto:redacted@redacted.tld">redacted@redacted.tld</a>) 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=><a class="moz-txt-link-rfc2396E" href="mailto:redacted@redacted.tld">"redacted@redacted.tld"</a>)<br>
<br>
This is with manual query taken from MySQL query log:<br>
<title>Neznámá tabulka</title>
<meta name="GENERATOR" content="HeidiSQL 9.3.0.5083">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
thead tr {background-color: ActiveCaption; color: CaptionText;}
th, td {vertical-align: top; font-family: "Tahoma", Arial, Helvetica, sans-serif; font-size: 8pt; padding: 3px; }
table, td {border: 1px solid silver;}
table {border-collapse: collapse;}
thead .col0 {width: 56px;}
.col0 {text-align: right;}
thead .col1 {width: 63px;}
.col1 {text-align: right;}
thead .col2 {width: 76px;}
.col2 {text-align: right;}
thead .col3 {width: 69px;}
.col3 {text-align: right;}
thead .col4 {width: 147px;}
thead .col5 {width: 80px;}
thead .col6 {width: 76px;}
thead .col7 {width: 124px;}
thead .col8 {width: 222px;}
thead .col9 {width: 56px;}
thead .col10 {width: 51px;}
.col10 {text-align: right;}
thead .col11 {width: 56px;}
.col11 {text-align: right;}
thead .col12 {width: 63px;}
.col12 {text-align: right;}
thead .col13 {width: 70px;}
thead .col14 {width: 80px;}
thead .col15 {width: 81px;}
thead .col16 {width: 83px;}
thead .col17 {width: 119px;}
thead .col18 {width: 116px;}
thead .col19 {width: 129px;}
thead .col20 {width: 131px;}
thead .col21 {width: 142px;}
thead .col22 {width: 140px;}
thead .col23 {width: 103px;}
.col23 {text-align: right;}
thead .col24 {width: 109px;}
.col24 {text-align: right;}
thead .col25 {width: 98px;}
.col25 {text-align: right;}
thead .col26 {width: 118px;}
.col26 {text-align: right;}
thead .col27 {width: 122px;}
thead .col28 {width: 56px;}
.col28 {text-align: right;}
thead .col29 {width: 147px;}
</style>id;user_id;domain_id;policy_id;name;description;home;maildir;password;quota;used;id;user_id;name;description;virus_lover;spam_lover;banned_files_lover;bad_header_lover;bypass_virus_checks;bypass_spam_checks;bypass_banned_checks;bypass_header_checks;spam_tag_level;spam_tag2_level;spam_kill_level;message_size_limit;spam_subject_tag2;id;sa_username<br>
<a class="moz-txt-link-abbreviated" href="mailto:28;1001;20;26;redacted@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@redacted.tld">28;1001;20;26;redacted@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@redacted.tld</a><br>
<br>
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.<br>
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).<br>
<br>
Any clues what might be wrong?<br>
<br>
Thank you.<br>
</body>
</html>