[Rspamd-Users] Custom Endpoint Issue

Kendall Marino kendall at beehiiv.com
Tue Sep 16 19:58:51 UTC 2025


Following the updated example worked; thanks again for your feedback! I'll
continue on with my original goal in mind, and this has been a great help.

------
{
    "message": "Hello from Lua endpoint!",
    "params": [],
    "success": true
}
------

Kendall

On Tue, Sep 16, 2025 at 12:22 PM Andrew Lewis <rspamd-users at judo.za.org>
wrote:

> 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