[Rspamd-Users] Use of lua_path in options.inc
Steve Sturges (ststurge)
ststurge at cisco.com
Wed Jun 16 19:40:47 UTC 2021
Hi all-
In a few of the conf files in the unit test directories, I see something like this:
options = {
filters = ["spf", "dkim", "regexp"]
url_tld = "{= env.URL_TLD =}"
pidfile = "{= env.TMPDIR =}/rspamd.pid"
lua_path = "{= env.INSTALLROOT =}/share/rspamd/lib/?.lua";
enable_test_patterns = true;
dns {
nameserver = ["8.8.8.8", "8.8.4.4"];
retransmits = 10;
timeout = 2s;
}
}
However, when I attempt to set lua_path in local.d/options.inc, the additional path I specify does not get used and modules from that directory are not loaded.
In stepping through the code in the debugger and into rspamd_lua_set_path (from lua_common.c), I see that function invoked twice. The first time, it does not have a cfg_obj reference, the second time it does (which contains the reference to lua_path similar to the above. However, at that the function returns early because the lua_path already contains the value specified in RSPAMD_LUALIBDIR.
Any ideas how to get lua_path to work in this scenario?
Thanks for any insight!
Cheers
-steve
More information about the Users
mailing list