[Rspamd-Users] What's wrong with this?

Steve Witten caponecicero at gmail.com
Wed Feb 8 17:32:17 UTC 2023


I'm trying my hand at writing a simple custom rule.  I basically copy
pasted this from the manual into *local.d/headers_group.conf*:

rspamd_config.SW_MY_RULE = {
>      callback = function(task)
>          return true
>      end,
>      score = 3.0,
>      group = 'headers',
>      description = 'My description'
> }


I get the following when I reload *rspamd*:

> *stevewi: $*
> *sudo service rspamd reload*Performing sanity check on rspamd
> configuration:
> failed to load config: ucl parser error: error while parsing
> /srv/rspamd/etc/rspamd/local.d/headers_group.conf: line: 4, column: 8 -
> 'invalid character in a key', character: ','
> syntax BAD


I'm very new at Lua but I just don't see a mistake...  I've checked all the
line endings.  The rule compiles without the callback.

Can anyone point out the mistake?  Thanks in advance...

-- Steve


More information about the Users mailing list