Amavis ignores SQL white and blacklist configuration

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

I've added to:
these lines:
@lookup_sql_dsn = (['DBI:mysql:database=maildb;host=', '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 | user2 at | B  |       1 |
| user2 at | user1 at | 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: <>

More information about the amavis-users mailing list