On Mon, 2013-12-02 at 14:34 +0100, Gino Semseo wrote: > PD: Martin, I am not an experienced programmer, and all I do is bash > scripting to get success about the whitelist_from file... I am sure you > are true about programming a module doing this, but I cannot do it right > now. ;) > My plugin was written by modifying one I found on the 'net: its reasonably documented and should be easy enough to modify. Its a Perl module that uses an SQL query to query a view in my mail archive, which is implemented as a PostgreSQL database. It looks up the message's sender to see if we've previously sent them any e-mails. If we have, the message gets whitelisted by the associated SA rule. The view makes the sender details appear like a single table to the plugin, so it should need minimal changes to work with your whitelist. Off the top of my head you'd need to do something like this:
- rename all three files, plugin and rules to something meaningful for your installation - change the name of the table and the fields in it to match your database. - double check that the database has indexes that support this query or it may run very slowly. Copy the SQL query and run it by hand in an interactive SQL session to test that it works and that its fast enough. This is an important step due to differences between Postgres and mysql: Postgres speaks one of the most standards-compliant SQL dialects while mysql speaks one of the most non-standard dialects around. Hopefully this won't be a problem with such a simple query. - change the user/password/database name etc to match your installation Anybody with some knowledge of Perl and SQL should be able to help you get the plugin up and running. The files can be found here: http://www.libelle-systems.com/downloads/maplugin Martin