Why Amavisd need SQL table 'policy' and 'users' for white/blacklisting?
zhbmaillistonly at gmail.com
Mon Jun 16 20:01:15 CEST 2014
Dear Amavisd users,
I'm trying to store per-user white/blacklisting in SQL for Amavisd, but i don't understand why it requires records in table 'policy' and 'users' for white/blacklisting. Is per-user spam setting required for white/blacklisting? What's the relationship between these tables?
My Amavisd config:
$final_spam_destiny = D_DISCARD;
$spam_quarantine_method = 'sql:';
$spam_quarantine_to = 'spam-quarantine';
@storage_sql_dsn = (['DBI:...]);
@lookup_sql_dsn = @storage_sql_dsn;
My testing records:
sql> INSERT INTO mailaddr (id, email) VALUES (1, 'a at domain.ltd'), (2, 'b at domain.ltd');
sql> INSERT INTO wblist VALUES (1, 2, 'B'), (2, 1, 'B');
So sending email to each other should be blacklisted (classified as spam and quarantined into SQL database). But it doesn't work.
if i add records in table "policy" and "users", mail sent from each other will be blacklisted.
sql> INSERT INTO policy (id, policy_name) VALUES (1, 'test policy');
sql> INSERT INTO users (policy_id, email) VALUES (1, 'a at domain.ltd'), (1, 'b at domain.ltd');
Any advice would be great appreciate. Thanks.
More information about the amavis-users