<dns>
The default is 500. The line sets how many domains the engine takes from the precache file.
The manual stipulates: the value cannot exceed the number of domains declared in the file. That is, a ceiling above the length of the list is meaningless.
And it warns about the cost: a very large number will produce many frequent DNS queries, and this requires a scalable name resolution infrastructure.
The line works only together with the list (precached-domains-file) and the schedule (precached-refresh-interval).
This is discovered only by comparison: the number of lines in the file against the ceiling, or better, against the cache contents the node itself shows.
The other half: the ceiling and the interval together set a constant load on the resolver. It runs all the time, not only when there are messages — and grows in direct proportion to this number.
What to set. The number is calculated from the load, not from the file length:
| Value | When |
|---|---|
| 500 (default) | the list is short and fits under the ceiling |
| the file length | the list is deliberately limited to important receivers |
| more | only together with a resolver that can withstand this load |
The calculation is simple: the ceiling divided by the refresh interval is the number of queries per second, going on constantly. Five hundred domains with a five-minute interval give about two queries per second around the clock.
# keep the ceiling equal to the file length, not higher <dns> precached-domains-file /etc/pmta/precached-domains.txt precached-max-domains 500 precached-refresh-interval 5m </dns>
what people get wrong and how it ends2 mistakes▶
§ 3.3.16.3
§ 3.3.16.3
2 relations
grep -n -A4 '^<dns>' /etc/pmta/config wc -l /etc/pmta/precached-domains.txt pmta show precache | wc -l
3 articles
◇How the policy for a receiver is assembledSettings are assembled from the most general pattern to the most precise; the order of blocks in the file means nothing.◇Backoff mode — the queue's second personalityA queue that a receiver has started refusing switches to a parallel set of limits, retries and routes — ten directives that act only in this mode.◇Reputation monitoring inside the nodeThe engine itself watches the receiving servers’ replies and changes the queue mode on a pattern match — a reaction within the connection, not through telemetry.