Amavis ignores SQL white and blacklist configuration

Bartłomiej Gamla ubuntupostfix at outlook.com
Tue Dec 11 15:10:17 CET 2012


Hello,
 
I've added to:
/etc/amavis/conf.d/50-user
 
these lines:
@lookup_sql_dsn = (['DBI:mysql:database=maildb;host=127.0.0.1', 'mail', 'mailPASS']);
$sql_select_policy = 'SELECT spam_tag_level, spam_tag2_level, spam_kill_level, spam_subject_tag FROM users WHERE id IN (%k)';
$sql_select_white_black_list = 'SELECT wb FROM wblist WHERE (user=?) AND (address IN (%k)) AND enabled = 1';
 
Per user spam* are being fetched and applied - I can see query in MySQL log and each user has different spam levels. 
I can not get white and blacklist working. There is no single error in amavis log and MySQL log doesnt contain any entry with wblist query.
 
In wblist table i have 2 sample records:
mysql> SELECT * FROM wblist;
+------------------+------------------+----+---------+
| user             | address          | wb | enabled |
+------------------+------------------+----+---------+
| user1 at gugunet.pl | user2 at gugunet.pl | B  |       1 |
| user2 at gugunet.pl | user1 at gugunet.pl | B  |       1 |
+------------------+------------------+----+---------+
2 rows in set (0.00 sec)
 
So, communication between both users should be blocked, but is not - all mails are delivered.  		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.amavis.org/pipermail/amavis-users/attachments/20121211/d3090749/attachment.html>


More information about the amavis-users mailing list