Knowledge base

PMTA knowledge base›Block Global›Directive§ 3.3.1.36

name-server

Global

Which resolvers the node uses
in the configuration this is a linename-server the resolvers configured in the operating systeminside the block Global
Your own resolvers instead of the system ones

The line sets a name server address. If none is set, the engine uses the resolvers configured in the operating system.

The directive is repeated: several lines give several resolvers, and the engine goes through them in rotation, spreading the load.

The requirement for the resolvers themselves is a separate topic: the engine needs a recursive service, and a resolver that answers with referrals silently slows delivery down. It is covered in recursive-resolver-requirement.

Next to it lives edns-udp-length — an extension that raises the response size limit. It concerns the same queries.

The main trap is that the default leaves the choice to the hosting provider. Without the line the operating system’s resolvers apply, and on a rented server they were set by the hosting provider. What they are, who maintains them, whether they have recursion quotas — these are questions you have no answer to.

For a node that resolves names for every message, this is a poor default: the resolver ends up in the delivery path, and you do not control it.

The second half: a single resolver is a point of failure. Rotation starts with the second line.

What the Hub does. It does not write it: the resolvers stay the system ones, that is, the ones the node’s hosting provider configured.

The Hub has no monitoring of name resolution of its own either: it shows the resolver state in node monitoring, but does not parse log warnings about non-recursive responses.

Recommended values

What to set. The resolver is part of the delivery path, and it is worth choosing deliberately:

Value When
do not write it a single node, light load, a reliable hosting provider
two or three lines the usual case for a fleet: your own resolvers plus a backup
a local caching one large volume and many domains: fewer external queries

Public resolvers are convenient as backups, but they have per-source limits, and under load they start answering with referrals — the very malfunction that is visible only in the log.

The behavior without the line, repeatability and rotation come from the manual, § 3.3.1.36. The recursion requirement comes from § 4.2.3. The breakdown of cases is ours.
Example configuration
# your own resolver as the primary, a public one as backup
name-server 10.1.2.3name-server 8.8.8.8
The engine goes through them in rotation, not in order: the second line is not a backup in the strict sense, it is just as much in use.
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▶

Leaving the hosting provider's resolvers

our experience

What it costsName resolution is part of the delivery path, and you do not control this part. The resolver’s recursion quotas, response time and reliability remain unknown, and the slowdown they cause is visible only in the log.
How to spot itThere is no line in the configuration, and the system resolver file holds the hosting provider’s addresses.
How to do it rightSet your own resolvers explicitly, at least two.

Setting a single resolver

§ 3.3.1.36

What it costsThe failure of the only resolver stops name resolution, and delivery with it. Rotation, which is why the directive is repeated, starts with the second line.
How to spot itThe configuration has one resolver line.
How to do it rightAdd a second one — even a public one, as a backup.

Using a public resolver as the primary

§ 4.2.3

What it costsPublic resolvers have limits per query source. Under load they start answering with referrals, the engine discards these responses and repeats the query — delivery silently slows down.
How to spot itThe log has warnings about non-recursive responses, and they appear during mailings.
How to do it rightUse your own resolver as the primary and keep a public one as a backup.
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
name-server <ip-address>
Values
a name server address; the line can be repeated
Default
the resolvers configured in the operating system § 3.3.1.36
Applying
reload, no restart needed
Queue
will not touch what is already queued
Where to write it
Global
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 configuration file and applies to the whole node: there is one set of resolvers per instance. Different ones cannot be set for different streams or recipient domains.
How to check on the node
The setting is visible in the configuration, the operation — with a resolution command:
grep -n 'name-server\|edns-udp-length' /etc/pmta/config
cat /etc/resolv.conf
pmta resolve gmail.com
If the configuration has no lines, the resolvers from the second command apply — the ones the hosting provider set. The third shows whether resolution goes all the way through.
In the Hub
Cost of a mistake
disruptive: applying it interrupts the node
Scenarios
Troubleshoot deliverability · Prepare a node for sending