Knowledge base

PMTA knowledge base›Block Global›Directive§ 3.3.1.22

smtp-source-host

Globalcritical

Local address and greeting name for outgoing mail
in the configuration this is a linesmtp-source-hostinside the block Global
The same name 1:Global<virtual-mta>— some of them are other settings, some are the same one
Which address and under what name the node goes out

A pair of two words — an address and a name — and it is exactly what the receiver sees about you first: which address the connection came from and what the sender called itself.

It can be repeated, and that changes the meaning. Several lines in one scope add up to a set that the engine goes through round-robin. The same holds inside a sending address: three lines are three addresses among which its connections are distributed evenly. So a sending address is not necessarily a single address.

A CIDR range works like a list. All of the node’s local addresses that fall within the range get into the set; 127.0.0.1 is excluded automatically — you cannot reach an outside node from it. Convenient, but it takes away the ability to manage addresses individually.

Written inside a sending address, the line overrides the node’s set for messages that leave through it. This is how a fleet gets one identity per address.

The main trap. Behind a proxy, the local address and the address the receiver sees are different. This line sets the local one; the one presented to the outside is set by smtp-proxy-source-host. Limits “per outgoing address” are counted by the local one by default, and that is changed with the enable-source-ip-limits-on-sending-ip directive.
What the Hub does. It writes it — but not at the root of the file, rather in the sending address block: the same setting written in the second place. One line per address and no ranges: warm-up, limits and reputation must be counted for each address separately. The name in the second word is the sending domain, not the name from the reverse record; for a backup address the Hub chooses differently — there the address’s own name is presented if a reverse record exists. The Hub does not write the host-name directive at all: the greeting name is set here.
Recommended values

One line per address — and no ranges. The difference is not cosmetic:

How to write it What you get When to do it
a line per address the address is visible in accounting, warm-up and limits are counted for it always in a fleet
a CIDR range a round-robin set, addresses indistinguishable in the configuration a throwaway node where the addresses are equal
several lines in one sending address round-robin within the identity when the identity must be a group of addresses

The name must resolve back to this address. The name’s forward record points to the address, the address’s reverse record points to the name. A mismatch is one of the first things large receivers check, and the cheapest way to ruin a new address’s reputation.

The syntax, round-robin rotation and the exclusion of 127.0.0.1 come from the manual. “One line per address” is our rule, from fleet practice.
Example configuration
# one line per address: this is how the Hub assembles the configuration
<virtual-mta shop-example-com>
    smtp-source-host 203.0.113.10 shop.example.com</virtual-mta>

# a round-robin set — one identity for three addresses
<virtual-mta bulk>
    smtp-source-host 203.0.113.20 mta1.example.com
    smtp-source-host 203.0.113.21 mta2.example.com
    smtp-source-host 203.0.113.22 mta3.example.com
</virtual-mta>
The first block is an identity of one address, and that is what shows in accounting in the stream name field. The second is an identity of three: messages will be distributed among them evenly, and the addresses can no longer be told apart in the configuration, only in accounting by the delivery address field.
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▶

Not setting an address inside a sending address

§ 9.2

What it costsOmitting it is not an error but silent inheritance: messages leave from the node’s general set. On a node with several addresses this means a message left from an address nobody chose — and in warm-up this will be noticed only by a discrepancy in volumes.
How to spot itIn accounting, the delivery address field of one sending address changes from message to message.
How to do it rightSet the line explicitly in every sending address. The manual advises this twice, in separate paragraphs.

Using a range for brevity

our experience

What it costsA range turns the sending address into a group that can be neither warmed up nor limited individually: settings apply to the identity as a whole, while there are several addresses inside it.
How to spot itThe warm-up plan is designed for one address, but the load is smeared across several; the per-address bounce rate matches nothing.
How to do it rightA line per address. Wordier, but every address is manageable and distinguishable — that is exactly how the Hub generates it.

Setting a name that does not match the reverse record

§ 3.3.1.22

What it costsThe greeting name and the address’s reverse record disagree. Some large receivers consider this a sign of sloppy or foreign infrastructure and treat the messages more strictly.
How to spot itA new address’s deliverability is lower than expected, with a correct SPF zone and a working signature.
How to do it rightCompare dig -x <address> with what is in the second word. The Hub checks this before putting an address into service and warns.
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
smtp-source-host CIDR HOST-NAME
smtp-source-host IP HOST-NAME
Values
an address or CIDR range, followed by a fully qualified domain name
Applying
reload, no restart needed
Queue
will not touch what is already queued
Where to write it
Global, <virtual-mta>
How many times
may be repeated
Everything here comes from the manual, with the section.
Inheritance
The directive is written at the root of the file, in the Global section, and there it sets the address set for the whole node. Written inside <virtual-mta>, it replaces that set — rather than supplementing it — for messages leaving through that sending address. The manual advises setting it explicitly in every sending address: omitting it silently inherits the node’s general set, and that is almost never what was intended.
How to check on the node
Which address and which name are bound to the sending address is visible in its settings summary:
pmta show vmta-settings vmta1
In the output, each sending address has the Source Host IP and Source Host columns. The address must be the one you set, and the name must match the address’s reverse record: dig -x 203.0.113.10 +short must return exactly that name.
In the Hub
Managed at
Infrastructure → Sending addresses
Cost of a mistake
disruptive: applying it interrupts the node
Scenarios
Sending address rotation · Address warm-up · Message signing and authentication
Priority
critical