[Rspamd-Users] Multimap - Map content
Michael Grimm
trashcan at ellael.org
Fri Jun 7 19:45:43 UTC 2024
Gerald Galster <list+rspamd at gcore.biz> wrote:
>>> 3) You could set a symbol and a score
>> I had had to add (score):
>>
>> MM_BL_BODY {
>>>>> score = 1;
>> type = "content";
>> filter = "oneline";
>> multi = true;
>> regexp = true;
>> map = "/usr/local/etc/rspamd/local.d/MM_BL_BODY.map";
>> description = "blacklist specific key words in body"
>> }
>
> You probably need to set some sort of default score, which you do with
> score = 1 in MM_BL_BODY.
This is not a default score, it rather acts as an multiplier.
If I do increase to: "score = 10;" I will end up with ...
/boost\s+your\s+business/i MM_BL_BODY:7.50
… MM_BL_BODY (75)
> I'm using an alternative approach, not setting the score in MM_BL_BODY
> but in metrics.conf:
>
> group "MM_BL" {
>
> max_score = 10.0;
>
> symbol "MM_BL_BODY" {
>
> weight = 1.0;
> }
>
> symbol "MM_BL_FROM" {
> ...
> }
>
> ...
> }
>
> I group my blacklist symbols/maps and while setting individual scores (= weight in this case)
> I can set a max_score for all of them in case lots of maps match.
>
> Beware metrics.conf is deprecated and you'd better use groups.conf:
>
> https://rspamd.com/doc/configuration/#detail
>
> "The metrics.conf file, formerly featured in this documentation, was deprecated in version 1.7.
> It was succeeded by actions.conf and groups.conf."
>
> https://rspamd.com/doc/faq.html#how-to-change-score-for-some-symbol
Very much appreciated, I will have a closer look to that.
Thanks,
Michael
More information about the Users
mailing list