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.