Knowledge base

source-group

<source>

Which source group this source belongs to
in the configuration this is a linesource-groupinside the block <source>
The line without which the group is empty

The line assigns the source block to the named group. It limits nothing by itself — it links: the settings that need a group are declared in the <source-group> block, and the members are named here.

Why grouping is needed: some limits make sense not for one source but for several at once — when the same submitting party comes from several addresses. The group block has two such settings: max-smtp-in and reserved-smtp-in.

One group is made up of any number of sources; each names it with its own line.

The main trap is silence on a typo. The group name is not checked anywhere: a source assigned to an undeclared group simply ends up in none. There will be no error, and a limit you set for three will apply to two.

The other edge is the source merging rule. A line in a broad block goes to all subnets that did not name a group of their own, and the group unexpectedly turns out wider than intended.

What the Hub does. It does not write it: there are no source groups in its configuration at all. Submission goes under logins, and the limit on inbound connections is set once per node — total-max-smtp-in.

Groups would be useful where one submitting party comes from several addresses and needs guaranteed slots. We have one submitting party — the Hub itself.

Recommended values

What to set. The value is a group name; the question is what to group by:

Value When
do not write it (default) there is one submitting party, or inbound limits are not split
a name by sender one sender has several submission addresses, and it has to be limited as a whole
a name by purpose an “own” group with guaranteed slots and an “others” group without them

The second is the usual case for a node with several clients, the third for a node that accepts inbound mail in addition to submission.

The purpose and syntax come from the manual, § 3.3.7.55. The “what to group by” breakdown is ours.
Example configuration
# two addresses of one submitting party — one group
<source-group localSources>
    max-smtp-in 10
    reserved-smtp-in 5
</source-group>

<source 192.168.0.30>
    smtp-service yes
    source-group localSources</source>
The second address of the same party names the same group with its own line. The ten-connection limit applies to both together, not to each.
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 ends2 mistakes▶

Naming a group that does not exist

§ 3.3.7.55

What it costsThe source ends up in no group, and a limit calculated for several members applies to fewer. No error occurs.
How to spot itThe group limit fires earlier or later than expected from the number of members.
How to do it rightCheck the names: every name used must have a declared group block.

Assigning a broad block to a group

our experience

What it costsBy the merging rule the name goes to all subnets that did not name a group of their own. The “own” group unexpectedly takes in the whole internet, and the guaranteed slots stop being a guarantee.
How to spot itThe group line is in the 0/0 block.
How to do it rightName the group only in the blocks that really belong to 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-group <name>
Values
a group name
Applying
reload, no restart needed
Queue
will not touch what is already queued
Where to write it
<source>
How many times
once in the block
Everything here comes from the manual, with the section.
Inheritance
The directive lives in <source> and follows source merging: a connection falls under all address blocks that cover it, and a narrow one overrides a broad one. A group name given in the 0/0 block goes to every subnet that did not name its own — and gathers almost the whole node into one group.
How to check on the node
The group’s membership is put together by eye: the engine does not show it:
grep -n 'source-group' /etc/pmta/config /etc/pmta/virtualhost.txt
Every name used must have a declared group block. A name without a block gives nothing and does not report it.
In the Hub
Cost of a mistake
reversible: harms only while it is set
Scenarios
Connect a sending platform