Knowledge base

The node takes the stream whose address matches the connection address

selection by matching the receiving address
One value instead of a mapping table

A refinement of the listener method, and its difference is a useful one: you need neither a named source per stream nor a listener per address. The value by-smtp-source-ip in default-virtual-mta tells the node: look at which of your own addresses the inbound connection arrived at, and take the stream that has this address declared as its sending address.

Matching is done by smtp-source-host and its proxy form. That is, by data that is already in the stream definition — the method repeats nothing and duplicates nothing.

Hence its main property: the selection configuration does not grow. A node with ten streams on ten addresses routes by itself; an eleventh stream requires not a single line in the selection rules. For a fleet where addresses come and go, this is the difference between “regenerate” and “leave alone.”

The main trap. The method moves the work to the sender’s side: the sender must connect to the right node address. With your own programs this is fine; with someone else’s it is inconvenient. And the manual does not describe what happens when a connection arrives at an address with no stream behind it: parsing of the greeting name in that case falls back to the common settings, while nothing is said about stream selection.
What the Hub does. It uses it: by-smtp-source-ip sits in the general 0/0 source of the node’s working configuration (the base one does not have the line). For a fleet this is the right choice — addresses are added and removed all the time, while the selection line stays one.

Note what complements it: the header stands higher and remains the main warm-up method, and the same source also carries a selection list by return address. by-smtp-source-ip is the bottom layer for submission without a login: it picks up everything not chosen above. Submission under a login goes through its own sources — the general login defaults to the pool, a pair’s login to that pair’s own stream.

Recommended values

The mechanism has no values of its own: there is exactly one value, and it is reserved — by-smtp-source-ip in default-virtual-mta. There are no intermediate forms: either the node matches the destination address itself, or a specific name is set as the default.

Everything comes from the manual — the value itself and the matching rule. The “the configuration does not grow” assessment is ours.
Example configuration
# ten streams on ten addresses, one selection line for all
<virtual-mta mta1>
    smtp-source-host 203.0.113.10 mta1.example.com
</virtual-mta>

<source 0/0>
    default-virtual-mta by-smtp-source-ip</source>
Exactly this line sits in the general source of the working configuration the Hub writes. A connection to 203.0.113.10 will leave via the mta1 stream; adding an eleventh stream will not require editing the source.
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▶

Expecting selection on an address with no stream behind it

§ 9.4.5

What it costsMatching is done against the addresses declared in streams. A connection to a node address with no stream declared matches nothing, and the manual does not say what happens next.
How to spot itSome submissions behave differently from the rest, and the difference depends on the node address, not on the sender.
How to do it rightKeep the “node address ↔ stream” mapping complete. For exception addresses, set a regular default with a stream name in a narrow <source> block.

Relying on the method where the connection address is not chosen by the sender

§ 9.4.5

What it costsThe method moves the choice to the sender’s side: the sender must connect to the right node address. A platform connecting by a domain name with several A records will land on different addresses and go out through different streams.
How to spot itThe same sender is spread across several streams in accounting with no pattern.
How to do it rightEither give the sender an address rather than a name, or choose the stream with a method that does not depend on the connection — a header or a return address rule.
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.
Inheritance
It is inherited the same way as a regular default: default-virtual-mta is written in <source>, and a narrower block overrides a wider one. The by-smtp-source-ip value in a wide block is a sensible bottom layer: narrow blocks will name a specific stream when needed.
How to check on the node
The check is a comparison of two lists. Which address is declared for the stream:
pmta show vmta-settings vmta1
In the output each stream has its Source Host IP. A connection will work only on an address that is in this list; if a node address is listened on but has no stream, selection will not happen — the manual does not say what happens next, and this must not be relied on.
In the Hub
Cost of a mistake
reversible: harms only while it is set
Scenarios
Sending address rotation · Sending through proxies