SpamAssassin user prefs w/DB and MailScanner
Jan Brinkmann
lucky at the-luckyduck.de
Thu Apr 20 09:33:17 IST 2006
On Thu, Apr 20, 2006 at 12:50:58AM -0400, Leah Cunningham wrote:
> I've been starting to deploy MailScanner on several servers and have been
> quite pleased so far. I am doing a migration now from a server that was
> utilizing the SpamAssassin user prefs features to allow users to set custom
> whitelists, blacklists, and other settings. These were being stored in a
> mysql backend. Some relevant old spamassassin settings:
>
> user_scores_dsn DBI:mysql:sqmaildb:somehost.example.net:3306
> use_bayes 1
> bayes_auto_learn 0
> bayes_store_module Mail::SpamAssassin::BayesStore::SQL
> bayes_sql_dsn DBI:mysql:sqmaildb:somehost.example.net:3306
> auto_whitelist_factory Mail::SpamAssassin::SQLBasedAddrList
> user_awl_dsn DBI:mysql:sqmaildb:somehost.example.net:3306
>
> Does anyone have any experience integrating this type of configuration
> w/MailScanner, or pointers to docs?
You can do this using CustumFunctions. Take a look into for example
'/optMailScanner/lib/MailScanner/CustomFunctions'. There is a file
called MyExample.pm. You have to write a function, which looks up the
settings in the database. Then you return either 0 for no or 1 for yes
from your function. Scan Messages should be set to yes, and for example
Virus Scanning could be set to &YourCustomFunction :
Scan Messages = yes
Virus Scanning = &YourCustomFunction
More information about the MailScanner
mailing list