[Rspamd-Users] What's wrong with this?
Steve Witten
caponecicero at gmail.com
Wed Feb 8 20:33:01 UTC 2023
Thanks for your quick reply! I tried this...copy/pasted *directly* from
the manual (https://rspamd.com/doc/tutorials/writing_rules.html#lua-rules):
rspamd_config.HTML_MESSAGE = {
> callback = function(task)
> local parts = task:get_text_parts()
> if parts then
> for i,p in ipairs(parts) do
> if p:is_html() then
> return true
> end
> end
> end
> return false
> end,
> score = -0.1,
> description = 'HTML included in message'
> }
and I get the same thing:
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: 10, column: 11 -
> 'invalid character in a key', character: '0x0a'
> syntax BAD
FWIW, line: 10, column: 11 is:
if p:is_html() then
> return true
> end *-- <-right here*
This is very frustrating...not even the examples from the manual will
compile...
-- Steve
On Wed, Feb 8, 2023 at 10:29 AM G.W. Haywood via Users <
users at lists.rspamd.com> wrote:
<snip />
*Assuming* that line 4 column 8 is the comma after the 'end', then at
> a guess (I didn't test) you might need to put some statement in the
> callback which actually does something before it returns a value.
>
More information about the Users
mailing list