Knowledge base

PMTA knowledge base›Block Global›Directive§ 3.3.1.46

edns-udp-length

Global

EDNS payload size for routing queries
in the configuration this is a lineedns-udp-length EDNS disabledinside the block Global
A truncated answer is worse than a missing one

By default the extension is off. Then the old limit applies: a UDP response longer than 512 bytes is truncated.

The manual says directly what this risks: a truncated response may not deliver the whole route, and an incomplete route means delivery problems.

The line enables the extension and sets the maximum size. The value is from 512 to 2048 bytes; outside the range the engine silently adjusts it to the boundary.

And the vendor’s honest warning about the trade-off: a large packet is truncated less often but is more often blocked by a firewall and more often fragmented. The value is chosen for your network, not set to the maximum.

A separate caveat: the line does not affect the pmta resolve command — it has its own command-line option.

The main trap is “I’ll set it higher.” The value 2048 looks like a safe choice but actually trades one fault for another: truncation gives way to firewall blocking and fragmentation. And the second is noticeably worse than the first: the engine at least receives a truncated response, but not a blocked one.

The other half is verification. The name resolution command does not use this line, so a successful check with it says nothing about what happens in delivery.

What the Hub does. It does not write it — the extension is off, and the old 512-byte limit applies.

For major receivers with long MX lists this may be too little: the response is truncated, and the route is assembled incompletely. There is nothing to notice it with — the Hub has no monitoring of its own for name resolution.

Recommended values

What to set. The value is chosen for the network, not by the maximum:

Value When
do not write it there are few domains and the responses are short — the old limit is enough
1232 a common compromise: fits into a regular frame without fragmentation
2048 the network is entirely yours, firewalls are configured, fragmentation is not a problem

Verify not with the resolution command — it does not use this line — but by delivery behavior toward receivers with long responses.

The “extension off” default, the range and the silent adjustment, the “truncated less often — blocked more often” trade-off and the caveat about the resolution command come from the manual, § 3.3.1.46. The value 1232 as a compromise is ours.
Example configuration
# a compromise: fits into a regular frame and is not fragmented
name-server 10.1.2.3
edns-udp-length 1232
The largest value is not the best: a large packet is truncated less often but is more often blocked by a firewall and more often fragmented — that is what the manual itself says.
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 the largest value

§ 3.3.1.46

What it costsOne fault is traded for another: truncation gives way to firewall blocking and fragmentation. A blocked response is worse than a truncated one — the engine does not receive it at all.
How to spot itAfter enabling the extension, name resolution got worse, not better.
How to do it rightChoose the value for your own network, starting with a compromise of around 1232.

Checking the setting with the name resolution command

§ 3.3.1.46

What it costsThe command does not use this line — it has its own option. A successful check says nothing about what happens during delivery.
How to spot itThe check passes, while delivery to major receivers still fails.
How to do it rightPass the size to the command with its own option, and compare the output with delivery behavior.
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
edns-udp-length N
Values
an integer from 512 to 2048; outside the range it is silently adjusted
Default
EDNS disabled § 3.3.1.46
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
The directive is written at the root of the configuration file and applies to the whole node: one size for all routing queries. It cannot be set differently for different resolvers or recipients.
How to check on the node
The line is visible in the configuration, but name resolution cannot be checked with it:
grep -n 'edns-udp-length\|name-server' /etc/pmta/config
pmta resolve --edns gmail.com
The resolve command has its own –edns option with a fixed size of 2048: it does not use the configuration line, and its success says nothing about delivery. The real check is delivery to a receiver with a long MX list.
In the Hub
Cost of a mistake
reversible: harms only while it is set
Scenarios
Troubleshoot deliverability