Knowledge base

The source default is the bottom rung, tied to whoever connects

default identity by source address
The default stream — for those who cannot choose

The method was created for senders that cannot be changed: programs that cannot add headers, or a set of different machines, each of which should get its own address. Any number of <source> blocks can be declared, each with its own default, and a pool name is allowed instead of a stream name.

The defining property is that this is a default. It applies only when nobody higher up the ladder has spoken. So whether it takes effect on a specific message depends not on the configuration but on what the sender put into the message.

The main trap is taking the default for an assignment. For a platform that never sets headers, there is no difference. For one that starts setting them — after an update, on a developer’s initiative — the assignment silently stops working: the configuration has not changed, but messages go out from a different address.
What the Hub does. It writes the defaults itself, in both files of the working configuration. In the main file the general 0/0 source gets by-smtp-source-ip — the stream by the address the connection arrived at. In the addresses file the general login’s source gets a default pointing to the pool: a message without a header and without a matching rule will go out from one of the pool’s addresses in rotation; each pair’s login gets its own stream. The base configuration has no defaults.

What the Hub does not do is reason about what stands higher up. The default is written, but whether the platform overrides it with a header, the Hub neither knows nor checks.

Recommended values

The mechanism has no values of its own: the value is set by default-virtual-mta. The choice here essentially comes down to three options:

Value When What you get
a stream name the source has one sending address predictable and simple
a pool name there are several addresses and they are equal rotation by the engine
by-smtp-source-ip each address has its own stream a rule that does not grow with the number of addresses
The three value forms come from the manual. The “when to use what” recommendations are ours, from fleet practice.
Example configuration
# each submitting machine has its own stream, without a single header
<source 10.0.0.5>
    default-virtual-mta shop-example-com    always-allow-relaying yes
</source>

<source 10.0.0.6>
    default-virtual-mta news-example-com
    always-allow-relaying yes
</source>
Exactly the case this method exists for: two programs, neither of which can set control headers, and the separation rests on submission addresses. As long as they do not set headers, the default works as an assignment.
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▶

Setting a pool name as the default and being surprised by the greeting

§ 3.3.1.35

What it costsThe name in the SMTP greeting is taken from the first member of the pool, with no rotation at all. All the pool’s addresses introduce themselves with one name, and for all but one it diverges from the address’s reverse record.
How to spot itRecipients complain about a HELO and PTR mismatch; authentication checks pass worse than they should with a correct zone.
How to do it rightEither set a specific stream as the default, or set the greeting name for each stream separately — with the second word of smtp-source-host.

Treating the default as a guarantee

§ 9.4

What it costsThe default sits on the bottom rung and is overridden by everything above it. A client separation built on it alone holds only until the first header.
How to spot itA client’s messages suddenly go out from someone else’s address while the configuration is unchanged.
How to do it rightIf the separation must be strict, remove the header permission for this source rather than relying on the default.
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
The directive lives in <source> and merges by the source rule: a narrower block overrides a wider one. A default written in <source> 0/0 applies to everyone for whom no narrower block was found — and that is exactly why it is worth keeping meaningful rather than accidental.
How to check on the node
There is no direct check — the node does not show what is assigned to which source. Look at the assembled configuration:
grep -n -B3 default-virtual-mta /etc/pmta/config
It is useful to make sure the block you found really is the one the submission address falls under, and that there is no narrower block with a different default. Next, reconcile with accounting: the vmta field will show whether the default applied or the choice was made higher up.
In the Hub
Cost of a mistake
reversible: harms only while it is set
Scenarios
Connect a sending platform · Sender isolation