Luigi,

> is there a way to put the systemwide whitelist in a MySQL table instead if
> /etc/amavisd.conf?
>
> I'm referring to the table that in the standard configuration begins with
> '[email protected]' => -3.0
>
> In my installations I do not need a per-user whitelist (the users don't
> even know what a [white|black]list is), just a way to say "let the mail
> from domains such and such pass without blocks"

Possible. Similar to @score_sender_maps which adds score points
to senders (on a per-recipient basis if needed), the SQL lookup on
table wblist can either do hard white- or black-listing (wblist.wb
being 'W' or 'B'), or just assign score points (wblist.wb is numeric
or a string which can be interpreted as numeric).

-- per-recipient whitelist and/or blacklist,
-- puts sender and recipient in relation wb  (white or blacklisted sender)
CREATE TABLE wblist (
  rid integer unsigned NOT NULL,  -- recipient: users.id
  sid integer unsigned NOT NULL,  -- sender: mailaddr.id
  wb  varchar(10)  NOT NULL,  -- W or Y / B or N / space=neutral / score
  PRIMARY KEY (rid,sid)
);

If you want a global relation, just let wblist.rid point to a
'users' record which has just your domain name (with '@' prepended)
in a users.email field, e.g. (README.sql-mysql) :

INSERT INTO users VALUES (9, 5, 5, '@example.com', NULL, 'Y');

or even to a general catchall record, matching any recipient address:

INSERT INTO users VALUES (20, 0, 5, '@.', NULL, 'N');

and then:

INSERT INTO mailaddr VALUES (1234, 9, '[email protected]');
INSERT INTO wblist VALUES (20, 1234, '-3.0');

  Mark

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
AMaViS-user mailing list
[email protected] 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 
 AMaViS-HowTos:http://www.amavis.org/howto/ 

Reply via email to