The manual starts from the fact that delivery failure is normal, not an incident: invalid addresses, network glitches and misconfigured receivers are expected, and retries exist precisely for them.
It is worth investigating when mail piles up to one specific receiver. That is the sign that distinguishes a problem from ordinary noise.
The first circle is route and reachability. One command resolves the receiver’s name and connects to its mail hosts. Whichever half failed names the cause: the name did not resolve — it is a DNS question; the connection failed — a question for the network or the receiver.
The second circle is making the node try. The command triggers an immediate delivery attempt with the session written to the log: it will contain the receiver’s real responses, not our guesses about them.
The third circle is observation. If the problem is intermittent, a block with connection and command logging enabled is created for the receiver, and removed as soon as the answer is obtained. This is the most expensive step: the log grows fast.
That is, in our setup the first and second circles are available only by hand, by logging into the node. Telemetry shows what is happening — the queue is growing, the bounces are such and such — but not why: it does not contain the receiver’s real responses, only their parsed category.
This is a deliberate boundary: logging on every fleet node would be expensive. But when an investigation is needed, you have to go to the node manually.
Three circles and the cost of each:
| Circle | What it does | Cost |
|---|---|---|
| route and reachability | one command, reads DNS and connects | nothing |
| attempt with logging | one message, the session in the log | one delivery |
| per-receiver logging | writes every step of the conversation | grows fast, remove right away |
Start with the first and do not skip circles. Half the cases are explained already at the first: the name does not resolve or the host does not respond. There is no point going further.
Set up the third circle with the intention of removing it. A good habit is to create it together with a reminder, not “until it is figured out.”
# three circles in order pmta resolve gmail.com --connect pmta trace gmail.com --to-log# the third circle — a block with logging, and remove it right after
what people get wrong and how it ends3 mistakes▶
§ 4.2.2
§ 4.2.2
§ 4.2.2
6 relations
Resolve a name and connectThe first circle: resolves the receiver’s name and connects to its mail hosts. § 4.2.2Delivery attempt with the session loggedThe second circle: an immediate delivery attempt with the session logged. § 4.2.2log-connections<source>The third circle: logging connections, enabled for a specific receiver and removed right away. § 4.2.2log-commands<source>The third circle: logging the conversation’s commands — the most expensive investigation step. § 4.2.2
What the node tells about itself and through which channelsInvestigating a single receiver is exactly choosing between these surfaces in order. § 4.1.1Return a node fileThe investigation in which this output is one of the steps. inferenceThe name lookup did not complete — and no conclusion is drawnThe failure the very first investigation circle names: the receiver’s name did not resolve. § 5.8
pmta resolve gmail.com --connect pmta trace gmail.com --to-log && tail -n 100 /var/log/pmta/log pmta show queues gmail.com
3 articles
◇What the node tells about itself and through which channelsSeven observation surfaces: the web monitor, the console in four formats, the log, accounting, accounting search, metrics and export to external analytics.◇The watchdog that restarts the engineKeeps an eye on the engine and brings it back up after a crash by itself, sending a crash report to the postmaster address.◇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.