SPAM Filter question

Christian Tardif christian.tardif at servinfo.ca
Thu May 13 03:49:48 CEST 2010


On 2010-05-12 02:38, Gunnar Wrobel wrote:
>
> Quoting Christian Tardif <christian.tardif at servinfo.ca>:
>
>> Hi,
>>  Can the default horde spam filter be modified in any way?  I mean,
>> filtering by Spam Level is not precise enough for most
>> installations. Because there could be a great difference between
>> Level 4 and Level 5. What I would prefer is filtering based on
>> X-Spam-Flag. On the SpamAssassin, you get a great level of control
>> (you're not choosing between 4 and 5...  you could have 4.3) and
>> then set the X-Spam-Flag according to the target set in
> amavisd.conf
>> ($sa_tag2_level_deflt). Everyone already knows that. So, on the
> user
>> side, he choose to activate spam filtering or not. If more fine
>> control is absolutely necessary, why not set the default spam
> filter
>> to check against the X-Spam-Score instead of the X-Spam-Level?
>>  I know I can set all this with a custom rule...  but that would be
>> really cool if the default Spam rule in the web interface would be
>> really useable...
>
> I think so far this just has not been discussed since nobody 
> complained before :)
>
> Of course you can set the default level to the same level set for 
> amavis in the prefs within
>
> /kolab/var/kolab/www/client/ingo/config/prefs.php
>
> (section $_prefs['spam']).
>
> But if I understand you correctly than your are rather aiming at
>
> $conf['spam']['header'] = 'X-SpamLevel';
> $conf['spam']['char'] = '*';
> $conf['spam']['compare'] = 'string';
>
> within /kolab/var/kolab/www/client/ingo/config/conf.php
>
> Can you determine a setting that works with the spam flag on the Kolab 
> server and add this to an issue in our tracker? I would change the 
> default setting then and you would get it shipped with Kolab Server 2.3 :)

It only takes one to complain to open a discussion  :-)

I just found something while looking at the ingo code. One little thing 
that will suffice for me.

In /kolab/etc/kolab/templates/webclient-ingo_conf.php.template:

$conf['spam']['header'] = 'X-Spam-Score';
$conf['spam']['compare'] = 'numeric';

In /kolab/var/kolab/www/client/ingo/spam.php:

Change near line number 71:

from: $v = &$form->addVariable(_("Spam Level:"), 'level', 'int', false, 
false, _("Messages with a likely spam score....
to: $v = &$form->addVariable(_("Spam Score:"), 'level', 'number', false, 
false, _("Messages with a likely spam score....

So that you make sure the entered value is numeric, and the field name 
in the web client is set to Spam Score instead of Spam Level

The result of all this:

The sieve filter is then set to:

if header :value "ge" :comparator "i;ascii-numeric" "X-Spam-Score" ["9.2"] {
   fileinfo "INBOX/Spam";
   stop;
}

Isn't that nice?   Job done. The only thing that could be interesting is 
th get the initial default value for filtering (the 9.2 in my example) 
from the $sa_tag2_level_deflt value in /kolab/etc/amavisd/amavisd.conf. 
That would make sense, and would at the same time be a good default for 
most users. This seems to me to be a much more valuable Spam filtering 
solution than what's actually in place.

Now, how can this be proposed as default for the next release?

-- 

Christian Tardif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kolab.org/pipermail/users/attachments/20100512/6974d08c/attachment.html>


More information about the users mailing list