[Rspamd-Users] Custom Endpoint Issue
Andrew Lewis
rspamd-users at judo.za.org
Tue Sep 16 16:22:07 UTC 2025
Hi Kendall,
On Tue, 2025-09-16 at 11:59 -0400, Kendall Marino wrote:
> Thank you for the insight; after your message I did try moving the
> file to /etc/rspamd/, /etc/rspamd/local.d, and even l/ua.local.d/ and
> even renaming it to controller.lua.
The correct path should very likely be /etc/rspamd/controller.lua ; if
in doubt about where $LOCAL_CONFDIR might be on your build query
`rspamadm lua`:
```
LuaJIT 2.1.1753364724> rspamd_paths.LOCAL_CONFDIR
/etc/rspamd
```
> I've also attempted to update the init.lua file to reference it
> directly which was unsuccessful.
This is a wrong approach as it will be overwritten on upgrade.
> Am I to understand that there should be two files, one somewhere in
> /etc/rspamd/local.d that specifies some kind of configuration and one
> in /usr/share/rspamd/rules/controller/ that contains the lua code? Or
> should I be able to build this endpoint successfully with just one
> file? In the logs I see the pre-existing endpoints being registered,
> so I feel I must be missing something there. For what it's worth I
> did move away from trying to implement the originally mentioned code
> for now. I'd like to get this working with the sample code (what
> you've shared above from the docs) first before I try to add any more
> complexity.
It is possible but not necessary to use multiple files, refer to the
updated example here:
https://github.com/rspamd/docs.rspamd.com/pull/40/files
Best,
-AL.
More information about the Users
mailing list