Globaldeprecated
The line set the port on which the node accepts mail connections. The address was set by the neighboring line — smtp-ip — and the setting was split in two. The manual section consists of one sentence: “deprecated, use smtp-listener”.
The mechanism itself is analyzed on the smtp-ip page — both lines were deprecated by a pair of sections and are migrated only together. Here is what concerns the port specifically.
There was one port for the whole node. That is the main limitation of the old form: one pair of lines described one receiving point, while campaign submission and complaint receiving usually live on different ports. The replacement removes the limitation — the file can have any number of smtp-listener lines, and 0.0.0.0 may be repeated.
The implicit default belongs to the replacement, not to this line. If the file has no smtp-listener line, the engine starts a listener on 0.0.0.0:25 by itself — port twenty-five opens without any line in the configuration.
That is exactly why migrating the pair is not cosmetic: two ports are the very reason the pair was replaced with one repeatable line.
What to set. Nothing: the pair should be replaced.
| Value | When |
|---|---|
| do not write | always: the port is set by the replacement |
| port number | only in an old configuration that has not been migrated yet |
Migration. The port from this line and the address from the neighboring one are joined with a colon. If several ports are needed — and they almost always are — write as many replacement lines: the old form could not describe a second port.
# this is how it was written before — one port for the whole node smtp-ip 0.0.0.0 smtp-port 25 # this is how it is written now — one line per receiving point smtp-listener 0/0:2525 smtp-listener 0/0:25
what people get wrong and how it ends3 mistakes▶
§ 3.3.1.27
§ 3.3.1.27
§ 3.3.1.26
2 relations
grep -rn 'smtp-port\|smtp-ip\|smtp-listener' /etc/pmta/ ss -lntp | grep pmta
3 articles
◇Accept, route, deliverA message’s path inside the node: accept, decide where, deliver — and all the settings live between these three steps.◇Four value types the whole config is written inBoolean, domain pattern, regular expression and time interval — defined once in § 3.2 and then used by all directives.◇Reloading settings versus restarting the serviceThe configuration is read at startup, and after that edits are picked up by the reload command — except for the directives the manual marks as requiring a restart.