SpamAssassin user prefs w/DB and MailScanner

Dhawal Doshy dhawal at netmagicsolutions.com
Thu Apr 20 16:18:08 IST 2006


Leah Cunningham wrote:
> On Thursday 20 April 2006 04:33, Jan Brinkmann wrote:
>> 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
> 
> Ah, I had been hoping that you could just add the spamassassin settings to do 
> the user prefs lookups.
> 
> Is there another way to implement user level preferences in MailScanner that 
> would end up being similar to the SpamAssassin user prefs functionality.  
> Basically, I want to be able to allow each user to have their own white and 
> black lists that only apply to mail sent to their address, at a minimum.  It 
> would be nice if each user can set their own spam scoring prefs, etc.
> 
> Leah

See http://mailwatch.sf.net, it can do per-user / per-domain blacklists 
and whitelists (MySQL based, so that you can use the same list on 
multiple servers).

MailWatch can also have per-user spam scoring, letting you define the 
regular 'spam score' and 'high spam score'.. (this too is stored in a 
MySQL database).

Other than that, mailscanner (currently) doesn't support per-user bayes/awl.

- dhawal


More information about the MailScanner mailing list