[prev in list] [next in list] [prev in thread] [next in thread] 

List:       amavis-user
Subject:    Re: [AMaViS-user] spamassassin, bayes and sql
From:       Mark Martinec <Mark.Martinec+amavis () ijs ! si>
Date:       2005-11-29 0:06:31
Message-ID: 200511290106.31645.Mark.Martinec+amavis () ijs ! si
[Download RAW message or body]

Alexandru,

> I've set up spamassasin with sql support for the bayes database.
> Through the webmail interface(squirrelmail) i've installed a plugin that
> adds 2 buttons, so every user can mark a masses as spam or spam(if theese
> were detected wrong). Those buttons do something like this: sa-learn
> --spam (or ham) -u someuser@maildomain.org  followed by the message.
> If i would do something like: sa-learn -u amavis  i'm afraid of malicious
> users how will mark all ther spam as ham and all their ham as spam .. and
> ruin  the bayes system.
>
> My question/problem is: how can i make amavisd-new(or spamassasin, think
> the later is the one) read first the settings(spam & ham count, hashes,
> etc. from the amavis user records in the sql db, and after that from the
> users records(if he has any). Because now a malicious user will ruin only
> bayes only for his mailbox.
> As i see now, from amavisd debug-sa , sa is using userid 2 , wich is for
> amavis in the sqldb(mysql> select * from bayes_vars where id=2; returns
> the line with amavis).

Sorry to disappoint you, it can't be done. This is because there could
be multiple recipients and amavisd-new calls SA only once per message.
It wouldn't know which user's id to specify in a call to SA, which only 
expects one. SA does not have an API to be able to examine a mail message
only once and apply per-user settings as a second stage in processing.

If you need per-user bayes, you need to disable spam checking in amavisd-new
and call SA (spamc/spamd) at mail delivery time.

  Mark


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic