[Rspamd-Users] use ubuntus lua-sql-mysql package in rspamd
rspam at padaru.de
rspam at padaru.de
Mon May 16 06:29:44 UTC 2022
Hello list.
is there a way to use luasql.mysql on ubuntu 20.04 while the package
lua-sql-mysql is used
([1]https://packages.ubuntu.com/search?keywords=lua-sql-mysql&suite=foc
al) or its only possible with the module from luarocks?
An simple connection test with an lua file ouside from rspamd succeed.
But if i try to connect to the myslq database inside from
'/etc/rspamd/rspamd.local.lua' rspamd returns:
rspamd[1974815]: <fmn4k6>; cfg; rspamd_config_read: rcl parse error:
cannot init lua file /usr/share/rspamd/rules/rspamd.lua:
/etc/rspamd/rspamd.local.lua:34: module 'luasql.mysql' not
found:\x0A\x09no field package.preload['luasql.mysql']\x0A\x09no file
'/etc/rspamd/lua/luasql/mysql.lua'\x0A\x09no file
'/usr/share/rspamd/rules/luasql/mysql.lua'\x0A\x09no file
'/usr/share/rspamd/lualib/luasql/mysql.lua'\x0A\x09no file
'/usr/share/rspamd/lualib/luasql/mysql/init.lua'\x0A\x09no file
'./luasql/mysql.lua'\x0A\x09no file
'/luajit/share/luajit-2.1.0-beta3/luasql/mysql.lua'\x0A\x09no file
'/usr/local/share/lua/5.1/luasql/mysql.lua'\x0A\x09no file
'/usr/local/share/lua/5.1/luasql/mysql/init.lua'\x0A\x09no file
'/luajit/share/lua/5.1/luasql/mysql.lua'\x0A\x09no file
'/luajit/share/lua/5.1/luasql/mysql/init.lua'\x0A\x09no file
'/usr/lib/rspamd/luasql/mysql.so'\x0A\x09no file
'./luasql/mysql.so'\x0A\x09no file
'/usr/local/lib/lua/5.1/luasql/mysql.so'\x0A\x09no file
'/luajit/lib/lua/5.1/luasql/mysql.so'\x0A\x09no file
'/usr/local/lib/lua/5.1/loadall.so'\x0A\x09no file
'/usr/lib/rspamd/luasql.so'\x0A\x09no file './luasql.so'\x0A\x09no file
'/usr/local/lib/lua/5.1/luasql.so'\x0A\x09no file
'/luajit/lib/lua/5.1/luasql.so'\x0A\x09no file
'/usr/local/lib/lua/5.1/loadall.so'; trace: [1]:{[C]:-1 - require [C]};
[2]:{/etc/rspamd/rspamd.local.lua:34 - check_if_string_in_db [Lua]};
[3]:{/etc/rspamd/rspamd.local.lua:47 - <unknown> [main]}; [4]:{[C]:-1 -
dofile [C]}; [5]:{rspamd.lua:44 - <unknown> [main]};
Its possible to get the whole module and put in in /etc/rspamd/lua ?
References
1. https://packages.ubuntu.com/search?keywords=lua-sql-mysql&suite=focal
More information about the Users
mailing list