KumoMTA API

I’m trying to access the API using:

curl -u login:pass http://server:8000/api/admin/bounce/v1
But I’m getting the error: Trusted IP required, even though the IP is already added to the Trusted list.
Is this a bug, or is there something else that needs to be configured?

@sympathetic-fox read the READ ME FIRST and provide the required information listed in the link on how to ask for help.

  • kumod 2025.03.19-1d3f1f67
  • Linux 5.15.0-78-generic #85-Ubuntu SMP Fri Jul 7 15:25:09 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

init.lua

init.lua (2.77 KB)

Your trusted IP list is just ALL IPs?

Also shw the copy/paste of your actual Curl command and the actual output.

And you haven’t implemented http_server_validate_auth_basic - KumoMTA Docs so the user/pass isn’t going to be checked.

Yes, this is a test server.
http_server_validate_auth_basic is like a debug mode — it accepts any login and password values and just logs them to syslog.

kumo.on(‘http_server_validate_auth_basic’, function(user, password)
print(“KUMO AUTH DEBUG: user=“..tostring(user)..“, password=“..tostring(password))
return true

Did I miss that in the init.lua you posted?

yep
6 line

curl -u admin:admin1 http://host:8000/api/admin/bounce/v1
Trusted IP required

curl -v -u admin:admin1 http://host:8000/api/admin/bounce/v1

  • Trying IP:8000…
  • Connected to host (IP) port 8000 (#0)
  • Server auth using Basic with user ‘admin’

GET /api/admin/bounce/v1 HTTP/1.1
Host: host:8000
Authorization: Basic YWRtaW46YWRtaW4x
User-Agent: curl/7.81.0
Accept: /

  • Mark bundle as not supporting multiuse
    < HTTP/1.1 401 Unauthorized
    < content-type: text/plain; charset=utf-8
    < content-length: 19
    < date: Fri, 18 Jul 2025 14:56:34 GMT
    <
  • Connection #0 to host host left intact

And what was the print output?

previous message

I don’t see anything from the syslog saying KUMO AUTH DEBUG in youre previous message.

curl -u admin:admin1 http://host:8000/api/admin/bounce/v1
Trusted IP required

curl -v -u admin:admin1 http://host:8000/api/admin/bounce/v1
Trying IP:8000…
Connected to host (IP) port 8000 (#0)
Server auth using Basic with user ‘admin’
GET /api/admin/bounce/v1 HTTP/1.1
Host: host:8000
Authorization: Basic YWRtaW46YWRtaW4x
User-Agent: curl/7.81.0
Accept: /

Mark bundle as not supporting multiuse
< HTTP/1.1 401 Unauthorized
< content-type: text/plain; charset=utf-8
< content-length: 19
< date: Fri, 18 Jul 2025 14:56:34 GMT
<
Connection #0 to host host left intact

Check your syslog.

Jul 18 15:15:35 host kumod[3173888]: KUMO AUTH DEBUG: user=admin, password=admin1

Just for fun, implement the example in the docs instead?