whitelist/blacklist sender domain

Dino Edwards dino.edwards at mydirectmail.net
Tue Mar 15 10:14:39 CET 2016


I'm trying to whitelist/blacklist either a sender email address or a sender domain to an internal domain. So if I understand this correctly, I would get the ID of the sender from the mailaddr table. So for example if I wanted to blacklist @hotmail.com, in my mailddr table, the id for @hotmail.com is 410. Then I would get the ID of my internal domain from the users table so for example @mydirectmail.net in my users table is 460, I would put the wblist entry as follows:

rid           sid          wb
460         410         B

This does not seem to be working. However, if I whitelist/blacklist a sender domain to a specific recipient email address it works as well as whitelist/blacklist a sender email address to a recipient email address. 

Here's my wblist query from 50-users file:

$sql_select_white_black_list =
  'SELECT wb FROM wblist,mailaddr,users'
  . ' WHERE (users.id=?)'
  . ' AND (wblist.rid=users.id)'
  . ' AND (wblist.sid=mailaddr.id)'
  . ' AND (mailaddr.email IN (%k))';

Any idea what's going on here?



More information about the amavis-users mailing list