Jo,

> So I'm working on making the amavisnewsql plugin work with the latest
> tables.  (patch coming)
>
> One of the changes that he made in the tables was to unify mailaddr
> and wblist.  So instead of
>
> # ' FROM wblist JOIN mailaddr ON wblist.sid=mailaddr.id'.
> #   ' WHERE wblist.rid=? AND mailaddr.email IN (%k)'.
> #   ' ORDER BY mailaddr.priority DESC';
>
> It's just
>
> # ' FROM wblist WHERE wblist.rid=? AND wblist.email IN (%k)'.
> #   ' ORDER BY wblist.priority DESC';

Sure, if you like it. All you have to do is assign an appropriate
SQL clause in amavisd.conf to match the schema, e.g.:

$sql_clause{sel_wblist} = 
  'SELECT wb FROM wblist WHERE rid=? AND email IN (%k)'.
  ' ORDER BY priority DESC';

> After looking at the the tables, and testing repeatedly with some
> sample datasets, it strikes me that amavisd should probably be doing
> this.  The size of repeated data isn't large enough to cause a
> problem, and dropping the join improves performance on both mysql and
> postgres even with the larger tables.  I used 100k and 1mil table
> sizes for my example with 100 entries per address, and it still came
> out faster.

How many entries are there normally in SQL based w/b lists?
Does a lookup take more than a few milliseconds?

Whitelisting without additional checks (DKIM or SPF or IP -based)
is too unreliable, and blacklisting needs should probably
be dealt with by adding dedicated SpamAssassin rules on other
features of a message, seldomly based on sending address only.

For 2.6.0 I'd like to provide whitelisting based on valid
DKIM signatures (as currently provided by SpamAssassin's
whitelist_from_dkim) and a choice between ennvelope- or author-
based whitelisting. This will probably bring some extensions
to SQL schema, but I'm not there yet.

For basic automatic whitelisting the pen pals feature accomplishes
this job quite well. All a user needs to do is communicate with
the remote user, and replies are whitelisted (to some extent)
automatically.

> Is there any reason that this change shouldn't be adopted by amavisd
> in 2.6 ?

Compatibility.
A simple setting in amavisd.conf adapts it to a schema in use.

  Mark

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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