<dns>
The value is a path to a text file with one domain per line.
The manual describes the usual order like this: the engine looks up a route in DNS when recipients are submitted for a domain — and only if it does not have one yet. The delay from this is small, but it exists, and it depends on how loaded the resolver and the queue are.
The domains listed in the file are resolved in advance and always. The point is to take name resolution out of the delivery path for the receivers that matter more than the rest.
Two neighboring lines set the schedule (precached-refresh-interval) and the ceiling (precached-max-domains); the whole mechanism is described in precached-domains.
The second half: the file is read by the engine, and it needs the same permissions as the configuration. An unreadable file is not an apply error but simply an empty cache.
Our list would be short and obvious — the large receivers that carry the bulk of the volume. But along with it we would have to accept the mechanism’s main property: we would notice a receiver’s route change with a delay of one refresh interval.
What to set. A path to a file; the rules follow from the purpose:
| Property | Why |
|---|---|
| a short list | every refresh means queries for all domains at once |
| only stable routes | the engine will not notice a route change until the refresh |
| no more lines than the ceiling | the rest is silently cut off |
The list is worth keeping next to the configuration and editing together with it: it is part of the setup, not data.
# the list file plus two lines for the schedule and the ceiling <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
our experience
2 relations
grep -n -A4 '^<dns>' /etc/pmta/config wc -l /etc/pmta/precached-domains.txt pmta show precache
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.