using rspamd/local.d: how to redefine the bayes score?

682 views
Skip to first unread message

Felix Schwarz

unread,
May 23, 2016, 6:12:48 PM5/23/16
to rsp...@googlegroups.com

I noticed that the bayes spam score is too low for my systems so I'd like to
raise the max value.

Doing so seems to be simple enough when using rspamd.conf.local
metric {
name = "default";
group {
name = "bayes";
symbol {
weight = 8.0;
description = "Message probably spam, probability: ";
name = "BAYES_SPAM";
}
}
}

However dropping a file in rspamd/local.d seems to be much easier but I wasn't
able to get this working. Naively I expected I could drop the contents above
in rspamd/local.d/metrics.conf but somehow rspamd does not pick up the new
values there.

Probably I just don't rspamd well enough and that's a trivial thing but I'd be
grateful for any pointers.

Felix

Vsevolod Stakhov

unread,
May 23, 2016, 6:29:00 PM5/23/16
to Felix Schwarz, rsp...@googlegroups.com
In fact, metrics are very special in terms of override/addition. It is
an artefact remaining from `xml` ages. So far, metrics should be
actually redefined in `rspamd.conf.local` as following:

```
metric {
name = "default";
group "xxx" {
...
}
symbol "yyy" {
...
}
}
```

Unlike other configuration pieces, metrics allow multiple definitions
that are glued together during the processing stage. Hence, if you
define multiple metrics with the same name they would be concatenated
into the same object.

--
Vsevolod Stakhov

Felix Schwarz

unread,
May 24, 2016, 3:39:53 AM5/24/16
to rsp...@googlegroups.com

> In fact, metrics are very special in terms of override/addition. It is
> an artefact remaining from `xml` ages. So far, metrics should be
> actually redefined in `rspamd.conf.local` as following:

Ah, ok. Thanks.

Felix
Reply all
Reply to author
Forward
0 new messages