Knowledge base

PMTA knowledge base›Block <domain>›Directive§ 3.3.10.93

source-ip-max-msg-rate

<domain>

How many recipients per interval to attempt from one outgoing address
in the configuration this is a linesource-ip-max-msg-rate unlimitedinside the block <domain>
The message rate, counted for each address separately

How many recipients the engine undertakes to serve per interval from a given sending address to a given recipient domain. Attempts are counted, not successes: a temporary refusal uses up the limit just like an accepted message.

What the directive was invented for — the manual says so directly. It is for those who gather several IPs into one sending address and want to limit the rate of each IP per recipient domain. Without it there is only max-msg-rate — the rate of the whole queue, which the IPs inside share however it happens: the address whose messages were picked up first takes someone else’s share.

The mask comes first, and each address gets the number. source-ip-max-msg-rate 1.2.3.0/24 600/m means six hundred messages per minute from each address in the subnet. What counts as a sending address is decided by enable-source-ip-limits-on-sending-ip.

Three rate levels act at the same time. The queue (max-msg-rate), the sending address as a whole (max-smtp-msg-rate) and an individual IP within the queue — this one. The lowest one triggers, and in the monitor the difference is visible only from the text of the limit message.

The main trap. It multiplies where you do not expect it — twice. The number applies to each address in the mask and to each recipient domain: four addresses sending to ten large mailbox providers at 600/m means up to twenty-four thousand messages per minute, not six hundred. The line looks like a limit, but in fact it sets a multiplier.
What the Hub does. It does not write it — the case the directive was written for does not arise for it: each sending address has exactly one smtp-source-host, and the queue rate already is the address rate. During warm-up the Hub keeps the daily volume with its own scheduler and gives the engine the queue rate — max-msg-rate in the <domain> block inside the address.

It will be needed in someone else’s configuration where IPs are gathered in bundles. With the proxy gate it was not needed: each proxy has its own sending address with a single smtp-proxy-source-host line.

Recommended values

Divide, do not assign. Take the rate you are willing to give the whole queue and divide it by the number of addresses in the mask — that is the value. Assigning each address “as much as you can spare” is pointless: the recipient domain sees the sum.

Count per large recipient domain. The value applies within one queue, that is, separately for each mailbox provider. An address’s daily plan is first divided by the number of receivers, and only then spread over the sending window.

The denominator accepts a multiplier — 100/15m, 83/5s. It appeared in PowerMTA 5.

The default is unlimited: there is no separate per-address rate, and only the queue rate applies.

The calculation order is our recommendation. From the manual here come the purpose of the directive, the mask syntax, the rate grammar, counting attempts on a par with deliveries and the unlimited default.
Example configuration
# one sending address has four IPs, and we split the queue rate among them
<domain comcast.net>
    max-msg-rate 2400/m
    source-ip-max-msg-rate 1.2.3.0/30 600/m</domain>
Four addresses at six hundred messages per minute give exactly the queue rate. If the mask covered more addresses, the sum would exceed it, and max-msg-rate would become the actual ceiling.
yellow — — directive names, blue — blocks. They are highlighted the same way in the text of the card.
▲

Common mistakes and problems

what people get wrong and how it ends3 mistakes▶

Treating the value as shared by the whole mask

§ 3.3.10.93

What it costsThe rate applies to each matching address. 1.2.3.0/24 600/m means up to six hundred messages per minute from each address in the subnet, and the recipient domain will see the sum across all of them.
How to spot itThe actual rate is a multiple of the number of addresses brought up and grows when a new IP is added, even though nobody touched the configuration.
How to do it rightDivide the rate intended for the queue by the number of addresses in the mask and write the result. Recalculate when the address space changes.

Forgetting that the limit applies to each recipient domain separately

our experience

What it costsThe value lives in a receiver block, which means it is counted per queue. With ten large mailbox providers, 600/m means up to six thousand messages per minute from one address, not six hundred.
How to spot itAn address’s estimated daily volume is used up in hours instead of a day.
How to do it rightFirst divide the address’s daily plan by the number of receivers, then spread it over the sending window — and write only the result here.

Relying on the limit when sending through a proxy

§ 3.3.10.86

What it costsWith the switch at its default, the count goes by the node’s local address, and behind a proxy there is only one for the whole fleet of rented addresses. The “per address” rate becomes a per-node rate.
How to spot itThe total rate does not grow when rented addresses are added.
How to do it rightEnable enable-source-ip-limits-on-sending-ip and restart the service — a configuration reload is not enough for it.
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.
Reference data
Syntax
source-ip-max-msg-rate CIDR { unlimited | 0 | N/[M]{d|day|h|hr|m|min|s|sec} }
Values
a network mask and a rate — for example 1.2.3.4 600/m; unlimited, 0 and a multiplier in the denominator (100/15m) are allowed
Default
unlimited § 3.3.10.93
Applying
reload, no restart needed
Queue
will not touch what is already queued
Where to write it
<domain>
How many times
once in the block
Everything here comes from the manual, with the section.
Inheritance
The value merges across <domain> blocks from general to specific: the best-matching block wins, not the last one in the file. The line can be repeated with different masks — this is how the address space is split into parts with different rates. It is picked up by pmta reload; no restart is needed.
How to check on the node
The line is checked by reading the configuration, and its triggering in the web monitor: it names the directive that held back the queue, and the name shows which of the three rate levels was hit.
grep -rn source-ip-max-msg-rate /etc/pmta/
pmta show queues --maxitems=20
If a queue is stalled while it has many messages, compare the three rates with each other: the queue’s, the whole address’s and this one. The lowest one triggers. The Hub does not write the directive; monitoring shows the per-address summary, but not the effective limits.
In the Hub
Cost of a mistake
reversible: harms only while it is set
Scenarios
Address warm-up · Sending through proxies