Knowledge base

A node that politely refuses instead of crashing

Refusing at the entrance is cheaper than crashing under load

The task. A node on a VDS whose resources are shared with other machines, where the main danger is the hung engine the virtualization section warns about.

What it is made of:

  • max-memory-usage-percent — above a share of memory it answers 452 to MAIL FROM until usage drops;
  • spool-max-recipients — a ceiling on recipients in the queues: above it submission is refused with a temporary error;
  • total-max-smtp-out — the overall limit on outbound connections, and with it on descriptors and per-connection memory.

The parts have different scopes. All three are node-level.

How they interact. Two lines watch the same resource from different sides — counted recipients against measured memory — and the third sets how fast that resource is consumed. The manual does not present them as a set: the grouping is ours.

The main trap is leaving the memory threshold at its default. A value of 100 turns the check off: the node accepts mail until memory runs out, and instead of a temporary refusal submitters get a hung engine.
What the Hub does. It applies one part of three: total-max-smtp-out 5000 in the main configuration file. There is no memory threshold and no recipient ceiling — the engine defaults apply, and the memory threshold default, 100, turns the check off.
Recommended values

Three lines:

Line Default What to set
max-memory-usage-percent 100 — the check is off with headroom, for example 75
spool-max-recipients auto — from machine resources auto, until there is a measured reason
total-max-smtp-out 1200 on Enterprise, 200 on Standard from node resources, within the license
Behavior and defaults come from the manual (§ 3.3.1.50, § 3.3.1.8, § 3.3.1.2); the warning about hanging on a virtual machine is § 2.5. The grouping is our hypothesis.
Example configuration
max-memory-usage-percent 75
spool-max-recipients autototal-max-smtp-out 1200
The threshold of 75 comes from the manual’s example; above it submitters get 452 4.3.2 Server resources temporarily exhausted and retry later.
yellow — — directive names, blue — blocks. They are highlighted the same way in the text of the card.
Compatibility
PowerMTA 6.0
described in the manual of this version · platform: any
The vendor does not state the first version for every directive — there is no note here. The name also appears in the 5.0 edition of the manual.
How to check on the node
Check which limits are in force on the node:
grep -n 'max-memory-usage-percent\|spool-max-recipients\|total-max-smtp-out' /etc/pmta/config
pmta show status
No memory threshold line means 100 applies and the check is off; show status shows recipients in the queues and connections.