Knowledge base

PMTA knowledge base›Block Global›Directive§ 3.3.1.25

smtp-ip

Globaldeprecated

Mail receiving address — the deprecated half of a pair
in the configuration this is a linesmtp-ipinside the block Global
Half of a setting replaced with a whole line

The line set the address on which the node listens for incoming mail connections. The port was set separately — smtp-port — and the setting was always split across two lines. The manual gave this name a one-sentence section: “deprecated, use smtp-listener”.

The replacement joins address and port in one line — smtp-listener CIDR:PORT. The difference is not cosmetic: the “address plus port” pair could describe only one receiving point, while the replacement line can appear in the file any number of times, and 0.0.0.0 may be repeated to open several ports at once. On top of that the replacement has an optional source= parameter, which assigns the listener a submission block with ready-made settings.

🔴 The presence of the replacement silences this line. The manual’s wording is direct: if the configuration has at least one smtp-listener line, the engine ignores smtp-ip and smtp-port. It does not complain, does not warn — it simply does not look at them.

And if there is not a single replacement line, the engine implicitly starts a listener on 0.0.0.0:25. So you cannot close the port by removing all receiving lines: it is closed only by changing the port, not by deletion.

The main trap is a mixed configuration. The old pair of lines and one new line in the same file is the most common state of an unfinished migration. Only the new one will work: the engine will not read the address and port from the old pair at all, and the node will end up listening somewhere other than what two lines out of three say. The mistake produces neither a parse rejection nor a log line.
What the Hub does. It does not write the deprecated pair. It writes the replacement, and right away as two lines: smtp-listener 0/0:2525 for campaign submission and smtp-listener 0/0:25 for receiving complaints and bounces on the mail port.

So on any node assembled by the Hub the old pair would be silent by definition — replacement lines are always there.

⚠️ A separate subtlety for those searching the Hub’s code: the names smtp-ip and smtp-port do occur in the sources — but they are settings of another engine, MailerQ, where they are alive and mean their own thing. They have nothing to do with PowerMTA.

Recommended values

What to set. Nothing: the pair should be replaced with a single line.

Value When
do not write always: the receiving point is set by the replacement
address only in an old configuration that has not been migrated yet

Migration. The address from this line and the port from the neighboring one are joined with a colon: smtp-ip 0.0.0.0 plus smtp-port 25 give smtp-listener 0/0:25. Both old lines are removed after that — otherwise the file keeps settings the engine does not look at.

The deprecation mark and the replacement’s name are from the manual, § 3.3.1.25. The rule “smtp-listener present — this pair is ignored” and the implicit listener 0.0.0.0:25 are from the replacement’s section § 3.3.1.27. The migration order is ours.
Example configuration
# this is how it was written before — two lines for one receiving point
smtp-ip 0.0.0.0smtp-port 25

# this is how it is written now — and there can be several receiving points
smtp-listener 0/0:2525
smtp-listener 0/0:25
While the file has no replacement line, the pair above is in effect. As soon as one appears, the engine stops looking at both lines of the pair without reporting anything.
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▶

Migrating half of the pair

§ 3.3.1.27

What it costsOne replacement line is enough for the engine to stop reading both old ones. The node listens on what the new line says, and the address and port from the old pair take part in nothing — while they stay in the file and read as an effective setting.
How to spot itThe node accepts mail on a different address or port than the one written in the pair, although the lines are in place.
How to do it rightMigrate the pair as a whole and remove both lines right away. Check the result against the list of open ports, not against the file.

Removing receiving lines to close a port

§ 3.3.1.27

What it costsNot a single line is left — the engine implicitly starts a listener on 0.0.0.0:25. The port that was meant to be closed turns out open on all of the machine’s addresses.
How to spot itThe configuration has no receiving line, yet port twenty-five is listening.
How to do it rightClose receiving not by deleting the line but by changing the point: write a replacement line with the needed address and port. Restricting access to the node is the job of the firewall, not of this line.

Searching the Hub's code and finding live names

§ 3.3.1.25

What it costssmtp-ip and smtp-port do exist in the Hub’s sources — but they belong to MailerQ, another engine, where they are not deprecated and mean their own thing. A search by name suggests that the Hub writes the deprecated pair into the PowerMTA configuration, although it does not.
How to spot itA code search returns matches in files with Mailerq in their name.
How to do it rightCheck which engine the file belongs to. The PowerMTA configuration is assembled by PmtaConfigBuilder and its templates — there are only replacement lines there.
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-ip <address>
Values
an address or range; the manual gives no full grammar for this name
Applying
reload, no restart needed
Queue
will not touch what is already queued
Where to write it
Global
How many times
once in the block
Everything here comes from the manual, with the section.
Inheritance
Written at the root of the configuration file and applies to the whole instance: it has neither blocks nor inheritance. The replacement has the same scope, but there can be several lines, each describing its own receiving point — that was the reason for the replacement.
How to check on the node
Look at all three names at once: the deprecated pair and the replacement that devalues it:
grep -rn 'smtp-ip\|smtp-port\|smtp-listener' /etc/pmta/
ss -lntp | grep pmta
The second command shows what the node actually listens on. A mismatch with what is written in the file usually means a mixed configuration: the engine took the replacement lines and did not glance at the pair.
In the Hub
Cost of a mistake
safe: a wrong value breaks nothing
Scenarios
Configuration lifecycle