[Rspamd-Users] Custom Endpoint Issue
Kendall Marino
kendall at beehiiv.com
Fri Sep 12 20:42:39 UTC 2025
Hello all,
I'm relatively new to rspamd and I have a challenge that may be a bit
unorthodox. I already have a functioning custom module that checks a URL in
a message against an external system and returns the result, but I would
like to repurpose some of that functionality into a new, custom endpoint
that will accept only a single URL instead of requiring a full message body
and perform the check on that URL.
I find myself getting turned around trying to implement a custom endpoint
as documented here:
https://docs.rspamd.com/developers/controller_endpoints/
---------------------------
-- example_check.lua
return {
check = {
handler = handle_check,
enable = false,
need_task = false,
}
}
---------------------------
The documentation notes that when the file is in the /rules/controller/
directory, it should result in an endpoint of /plugins/example_check/check.
This doesn't seem to work for me, and the response from the /plugins
endpoint does not list it either.
I've tried other locations as well, either a 'controller.lua' or an
'example_check.lua' file containing the intended functionality in:
/usr/share/rspamd/rules/controller/local.d/
/usr/share/rspamd/rules/controller/
/usr/share/rspamd/plugins/
/etc/rspamd/local.d/
/etc/rspamd/
Paths I've tried: (all 404s)
/plugins/example_check/check
/local.d/plugins/example_check/check
/example_check/check
and so on.
I was also unsuccessful in finding similar use cases in the user archives
here which leads me to believe I've missed something (like some
configuration file, or even the correct endpoint). I'd like to think I'm
close, but I'd be grateful for any insight into what the problem could be
here.
Thanks for your time,
Kendall
More information about the Users
mailing list