Module 3 · Lesson 7 of 25

SMTP AUTH and rate limiting at the listener

Part of KumoMTA: High-Volume Sending Engine — Listeners, ESMTP, AUTH & TLS.

Wire up SASL PLAIN/LOGIN auth:

kumo.on('smtp_server_auth_plain', function(authz, authc, password, conn_meta)
  -- Look up credentials in your DB / file / Vault
  local ok = verify_password(authc, password)
  if ok then
    conn_meta:set_meta('tenant', tenant_for_user(authc))
    return true
  end
  return false
end)

You decide where credentials live — passwd-file, MySQL, Vault, HTTP API. KumoMTA just calls your function.

Per-listener rate limit to slow brute-force:

kumo.start_esmtp_listener {
  listen = '0.0.0.0:587',
  max_messages_per_connection = 1000,
  max_recipients_per_message  = 100,
  data_buffer_size           = '32MB',
  max_message_rate           = '50/s',  -- per source IP
}

Bind tenant metadata at AUTH time. Everything downstream — throttles, IP pool, queue selection — reads conn_meta for tenant. Get this right and the rest of the config writes itself.

Sign in to keep track of what you have read.

Pulse · self-hosted sending

Own the infrastructure your pipeline depends on.

One install script on your own server. Pulse sets up the MTA, mailboxes, certificates and dashboard; you add domains and start sending.

# on a fresh Ubuntu server
$ cd pulse && sudo ./install.sh
→ docker compose up · kumomta · stalwart · caddy
→ dashboard ready on https://pulse.yourdomain.com
$

Also from us:Beat — monitoring that tells you the fixConsulting — $65/hr, no retainer