Closed ahmeij closed 2 years ago
Hi,
you are correct! Thanks for noticing the error. I updated the README
I think I personally put the LUA file in local.d, but symlinked it to /etc/rspamd. This way all the customisation is in the same location.
I'm confused now. The README still shows cp *.conf rspamd.local.lua /etc/rspamd/local.d
. Is rspamd.local.lua
to be placed in /etc/rspamd/
(or symlinked from there) or not?
Note that other providers using similar anti-spam measures also place their own .lua
files under /etc/rspamd/
...
from what I can see in /usr/share/rspamd/rspamd.lua it will try to run /etc/rspamd/rspamd.local.lua OR (legacy, only if the other file does not exist) /etc/rspamd/lua/rspamd.local.lua.
Also, /etc/rspamd/local.d/rspamd.lua will be run, if found.
So as it is, the rspamd.local.lua should be copied to /etc/rspamd. If other programs require you to also place a rspamd.local.lua there, then I (personally) would just merge both files into one, as currently rspamd does not seem to allow for running all lua files found in a certain directory.
(or you could make on rspamd.local.lua which calls dofile(file1.lua), dofile(file2.lua), etc.). In the end what matters is that the code is somehow executed during initialization of rspamd.
Aye, I've followed your suggestion, and merged both, keeping them in /etc/rspamd.
This should actually be something worth documenting!
The command to copy all files to the rspamd folder as specified in the readme:
cp *.conf rspamd.local.lua /etc/rspamd/local.d
Seems to conflict with the needed configuration for Rspamd which expects the
rspamd.local.lua
to be in the/etc/rspamd
folder.As far as I can tell the file will not be loaded from the
/etc/rspamd/local.d
folder, it is ignored by therspamadm configtest
at least.