Hi,
> However, I do not think this is a good writing style.
> Is there any better way to write it?
That's probably fine. Way to write this with a Lua rule could be as follows:
~~~
-- /etc/rspamd/rspamd.local.lua
rspamd_config.HEADER_EXISTS_FOO = {
callback = function(task)
return task:get_header('Foo') and true or false
end,
score = 1.0
}
~~~
Best,
-AL.