<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>
</p>
<div class="moz-text-flowed" style="font-family: -moz-fixed;
font-size: 12px;" lang="x-unicode">I got an issue with
amavisd-new-2.11.0,1(freebsd 9.3). All messages with score less
than 0 are blocked as spam.
<br>
It happens when amavis configured to use mysql for lookups,
<br>
@lookup_sql_dsn = (
['DBI:mysql:database=amavis;host=localhost', 'amavis', 'password']
);
<br>
@storage_sql_dsn = @lookup_sql_dsn;
<br>
$banned_files_quarantine_method = 'sql:';
<br>
$spam_quarantine_method = 'sql:';
<br>
but when it isn't - all work accordinly to config options.
<br>
<br>
It looks like amavisd get zero values for options
<br>
spam_tag_level=>"0",
<br>
spam_tag2_level=>"0",
<br>
spam_kill_level=>"0",
<br>
spam_dsn_cutoff_level=>"0",
<br>
spam_quarantine_cutoff_level=>"0"
<br>
from mysql.
<br>
<br>
An "amavisd debug" log messages:
<br>
<br>
(36754-01) sql: preparing and executing (6 args): SELECT
users.*, policy.*, users.id FROM users LEFT JOIN policy ON
users.policy_id=policy.id WHERE use
<br>
rs.email IN (?,?,?,?,?,?) ORDER BY users.priority DESC
<br>
(36754-01) lookup_sql(<a class="moz-txt-link-abbreviated"
href="mailto:username@mydomain.tld">username@mydomain.tld</a>)
matches, result=(id=>"51", priority=>"3", policy_id=>"2",
email=><a class="moz-txt-link-rfc2396E"
href="mailto:username@mydomain.tld">"username@mydomain.tld"</a>,
fullname=>-, local=>
<br>
"Y", id=>"51", policy_name=>"Normal", virus_lover=>"N",
spam_lover=>"N", banned_files_lover=>"N",
bad_header_lover=>"N", bypass_virus_checks=>"N", bypa
<br>
ss_spam_checks=>"N", bypass_banned_checks=>"N",
bypass_header_checks=>"N", spam_modifies_subj=>"Y",
virus_quarantine_to=>"", spam_quarantine_to=>-, ban
<br>
ned_quarantine_to=>-, bad_header_quarantine_to=>-,
clean_quarantine_to=>"", other_quarantine_to=>-,
spam_tag_level=>"0", spam_tag2_level=>"0", spam_kil
<br>
l_level=>"0", spam_dsn_cutoff_level=>"0",
spam_quarantine_cutoff_level=>"0", addr_extension_virus=>"",
addr_extension_spam=>"", addr_extension_banned=>
<br>
"", addr_extension_bad_header=>"", warnvirusrecip=>"N",
warnbannedrecip=>"N", warnbadhrecip=>"Y",
newvirus_admin=>"", virus_admin=>"", banned_admin=>""
<br>
, bad_header_admin=>"", spam_admin=>"",
spam_subject_tag=>"", spam_subject_tag2=>"[SPAMMY]",
message_size_limit=>"0", banned_rulenames=>"", id=>"51")
<br>
<br>
<br>
And the same SQL query result made with mysql-client:
<br>
<br>
mysql> SELECT users.*, policy.*, users.id FROM users LEFT
JOIN policy ON users.policy_id=policy.id WHERE users.email IN ('<a
class="moz-txt-link-abbreviated"
href="mailto:username@mydomain.tld">username@mydomain.tld</a>',
'username', '@mydomain.tld', '@.mydomain.tld', '@.ru', '@.') ORDER
BY users.priority DESC\G
<br>
*************************** 1. row ***************************
<br>
id: 51
<br>
priority: 3
<br>
policy_id: 2
<br>
email: <a class="moz-txt-link-abbreviated"
href="mailto:username@mydomain.tld">username@mydomain.tld</a>
<br>
fullname: NULL
<br>
local: Y
<br>
id: 2
<br>
policy_name: Normal
<br>
virus_lover: N
<br>
spam_lover: N
<br>
banned_files_lover: N
<br>
bad_header_lover: N
<br>
bypass_virus_checks: N
<br>
bypass_spam_checks: N
<br>
bypass_banned_checks: N
<br>
bypass_header_checks: N
<br>
spam_modifies_subj: Y
<br>
virus_quarantine_to:
<br>
spam_quarantine_to: NULL
<br>
banned_quarantine_to: NULL
<br>
bad_header_quarantine_to: NULL
<br>
clean_quarantine_to:
<br>
other_quarantine_to: NULL
<br>
spam_tag_level: -999
<br>
spam_tag2_level: 2.5
<br>
spam_kill_level: 4.7
<br>
spam_dsn_cutoff_level: 7
<br>
spam_quarantine_cutoff_level: 20
<br>
addr_extension_virus:
<br>
addr_extension_spam:
<br>
addr_extension_banned:
<br>
addr_extension_bad_header:
<br>
warnvirusrecip: N
<br>
warnbannedrecip: N
<br>
warnbadhrecip: Y
<br>
newvirus_admin:
<br>
virus_admin:
<br>
banned_admin:
<br>
bad_header_admin:
<br>
spam_admin:
<br>
spam_subject_tag:
<br>
spam_subject_tag2: [SPAMMY]
<br>
message_size_limit: 0
<br>
banned_rulenames:
<br>
id: 51
<br>
*************************** 2. row ***************************
<br>
id: 2
<br>
priority: 1
<br>
policy_id: 6
<br>
email: @mydomain.tld
<br>
fullname: �� �������
<br>
local: Y
<br>
id: 6
<br>
policy_name: High
<br>
virus_lover: N
<br>
spam_lover: N
<br>
banned_files_lover: N
<br>
bad_header_lover: N
<br>
bypass_virus_checks: N
<br>
bypass_spam_checks: N
<br>
bypass_banned_checks: N
<br>
bypass_header_checks: N
<br>
spam_modifies_subj: Y
<br>
virus_quarantine_to:
<br>
spam_quarantine_to: NULL
<br>
banned_quarantine_to: NULL
<br>
bad_header_quarantine_to: NULL
<br>
clean_quarantine_to:
<br>
other_quarantine_to: NULL
<br>
spam_tag_level: -999
<br>
spam_tag2_level: 2.5
<br>
spam_kill_level: 3.6
<br>
spam_dsn_cutoff_level: 7
<br>
spam_quarantine_cutoff_level: 20
<br>
addr_extension_virus:
<br>
addr_extension_spam:
<br>
addr_extension_banned:
<br>
addr_extension_bad_header:
<br>
warnvirusrecip: N
<br>
warnbannedrecip: N
<br>
warnbadhrecip: Y
<br>
newvirus_admin:
<br>
virus_admin:
<br>
banned_admin:
<br>
bad_header_admin:
<br>
spam_admin:
<br>
spam_subject_tag:
<br>
spam_subject_tag2: [SPAMMY]
<br>
message_size_limit: 0
<br>
banned_rulenames:
<br>
id: 2
<br>
*************************** 3. row ***************************
<br>
id: 1
<br>
priority: 0
<br>
policy_id: 2
<br>
email: @.
<br>
fullname: NULL
<br>
local: Y
<br>
id: 2
<br>
policy_name: Normal
<br>
virus_lover: N
<br>
spam_lover: N
<br>
banned_files_lover: N
<br>
bad_header_lover: N
<br>
bypass_virus_checks: N
<br>
bypass_spam_checks: N
<br>
bypass_banned_checks: N
<br>
bypass_header_checks: N
<br>
spam_modifies_subj: Y
<br>
virus_quarantine_to:
<br>
spam_quarantine_to: NULL
<br>
banned_quarantine_to: NULL
<br>
bad_header_quarantine_to: NULL
<br>
clean_quarantine_to:
<br>
other_quarantine_to: NULL
<br>
spam_tag_level: -999
<br>
spam_tag2_level: 2.5
<br>
spam_kill_level: 4.7
<br>
spam_dsn_cutoff_level: 7
<br>
spam_quarantine_cutoff_level: 20
<br>
addr_extension_virus:
<br>
addr_extension_spam:
<br>
addr_extension_banned:
<br>
addr_extension_bad_header:
<br>
warnvirusrecip: N
<br>
warnbannedrecip: N
<br>
warnbadhrecip: Y
<br>
newvirus_admin:
<br>
virus_admin:
<br>
banned_admin:
<br>
bad_header_admin:
<br>
spam_admin:
<br>
spam_subject_tag:
<br>
spam_subject_tag2: [SPAMMY]
<br>
message_size_limit: 0
<br>
banned_rulenames:
<br>
id: 1
<br>
3 rows in set (0.00 sec)
<br>
<br>
<br>
What can be wrong? What else configuration or details should i
provide?
<br>
<br>
</div>
</body>
</html>