[Rspamd-Users] Regexp-based Rule Debugging

lists.rspamd.com at masquerade.email lists.rspamd.com at masquerade.email
Fri Oct 6 17:25:48 UTC 2023


In writing regexp-based rules, is there a way to print the formatted
regexp string in a log for debugging purposes?  For example:

<paste>

local some_string = [[/this|that|the other/i{words}]]
local another_string = [[/another|thing/i{words}]]
local last_string = [[/maybe/i{words}]]
config['regexp']['SOME_SCAM'] = {
      description = 'Some random scam',
      score = 666,
      group = 'my_rules',
      re = string.format('%s{words} & (%s | %s)', some_string,
another_string, last_string),
}

</paste>

I want to log 're'.

Thanks.


More information about the Users mailing list