Skip to content

Injecting Using HTTP

KumoMTA will listen for message injection in any listener defined in configuration. You have complete control over the IPs and Ports available for message injection.

The HTTP Listener will accept any properly formatted HTTP connection request allowed by its configuration. For instance, based on this:

kumo.start_http_listener {
  use_tls = true,
  listen = '',
  -- allowed to access any http endpoint without additional auth
  trusted_hosts = { '', '::1' },

KumoMTA will accept any HTTPS injection on port 8005 from the local host ONLY. (This also enables the full HTTP API from localhost).

The simplest test of HTTP injection can be done using cURL right from localhost console.

$ curl -i 'http://localhost:8005/api/inject/v1' \
 -H 'Content-Type: application/json' -d '
{"envelope_sender": "",
 "content": "Subject: hello\n\nHello there",
 "recipients": [{"email": ""}]

That should return something like this:


Any system that can use an HTTP API to pass JSON should work as an injection system if you follow the JSON payload formatting rules posted here