On Tue, 2011-10-25 at 00:51 -0700, SuperDuper wrote: > I am planning on exporting a list of our client's email addresses into a file > with 5000 separate lines as such: > whitelist_from cli...@somebody.co > I do essentially the same thing with an SA plugin and rule plus a database.
Background: I archive all incoming and outgoing mail in a PostgreSQL database because it keeps my mail folders nice and empty while making access to archived mail somewhat faster than searching through mail folders is. The archive schema includes a view that contains only the addresses of people I've sent mail to. The plugin does lookups on this view and has an associated rule that whitelists hits by applying a suitably large negative score. The benefit of handling whitelisting this way is that updating is completely automatic and doesn't require SA to be stopped and restarted each time the list changes: every time I write or reply to a new correspondent they appear in the view. Suggestion: there is nothing to stop the plugin from doing its lookups against a table provided that it contains at least the same column as the view and you have a way of keeping the table's contents up to date. The view looks like this: create view whitelist as select distinct email from address a, addresstype t where a.archive='yes' and a.self = 'no' and a.sdbk=t.asdbk and t.type='To'; So a table like the following should be fine and is probably general enough for it to be used without modification by any RDBMS. Of course it can have other columns that help to maintain the table and/or make it useful for other related tasks, e.g. a client list: create table whitelist ( email varchar(80) primary key ); If this sounds useful to you, the plugin is available here: http://www.libelle-systems.com/downloads/ma/docs/manual/whitelisting.html I should probably package the plugin with a table definition and make it available for freestanding use but that hasn't happened yet: maybe I should make that my next mini-project. Martin