issue with connecting kumomta with redis server on remote location

Issue: KumoMTA Failing to Connect to Remote Redis Server

Hi everyone,
I’m facing an issue connecting KumoMTA with a remote Redis server. A direct connection between the servers works fine, but KumoMTA keeps failing with the following error:

Error: Failed to parse policy file “/opt/kumomta/etc/policy/init.lua”
Caused by:
runtime error: [string “/opt/kumomta/etc/policy/init.lua”]:6: attempt to call a nil value (field ‘connect’)
stack traceback:
[string “/opt/kumomta/etc/policy/init.lua”]:6: in local ‘connect_to_redis’
[string “/opt/kumomta/etc/policy/init.lua”]:27: in main chunk
The service is stuck in a restart loop. Full logs are available here:

https://pastebin.com/QzM2gPP1

I’ve confirmed that Redis is reachable from the KumoMTA server using redis-cli. It seems like the connect function is either missing or not being recognized in my Lua policy file.

Any ideas on what could be wrong? Could this be a missing module or a configuration issue?

Thanks in advance for any help! :folded_hands:

“attempt to call a nil value” suggests an error in the lua code that you wrote.

We don’t support arbitrary external compiled lua extensions like the one I think you’re trying to use in your example.

open - KumoMTA Docs shows how to use the redis support provided with kumomta.