Module 4 · Lesson 9 of 25

Traffic shaping with throttles

Part of KumoMTA: High-Volume Sending Engine — Queues, Scheduling & Traffic Shaping.

Beyond queue defaults, KumoMTA's shaping module is where you encode per-destination wisdom (Gmail wants 250/sec from a warm IP, Yahoo wants 100/sec, AOL is finicky on Sundays).

Use the bundled shaping library:

local shaping = require 'policy-extras.shaping'

kumo.on('get_egress_path_config', shaping:setup({'/opt/kumomta/etc/policy/shaping.toml'}))

shaping.toml snippet:

["gmail.com"]
connection_limit = 20
max_connection_rate = "20/s"
max_message_rate = "250/s"
idle_timeout = "60s"

["yahoo.com"]
connection_limit = 10
max_message_rate = "100/s"

["*.protection.outlook.com"]
connection_limit = 4
max_message_rate = "40/s"

Why TOML for shaping but Lua for everything else? Shaping changes often (especially during IP warming) and TOML is operator-friendly. Hot-reload with kcli reload — no restart.

KumoMTA community ships a maintained shaping.toml with sane defaults for the top 50 destinations. Use it as your baseline.

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