Knowledge base

Recording the conversation just for the time of troubleshooting

Turn on, answer the question, turn off

The task. One recipient or one submission source behaves unevenly, and the breakage must be observed over time rather than caught with a single attempt. The recording must be narrow so as not to flood the log, and removed as soon as the answer is obtained.

What it is made of:

The parts have different scopes. The directives are documented for the source, but are also written in the recipient block: outbound recording in the recipient’s <domain>, inbound in the <source> for the submitting program’s address. The narrowness of the block is what keeps the volume down.

How they interact. The connection log and the command log complement each other: the first gives the session boundaries, the second what is inside, and reading a recording with only one of the two is guesswork. Data is a third level on top, not a replacement. No line expires by itself, and the manual does not say how much the byte-level stage writes.

The main trap is making the recording wider than the question. log-commands in <domain *> or <source 0/0> records the conversation of every connection on the node: the log grows before your eyes, and the needed session cannot be found in it.
What the Hub does. It does not apply it: the Hub explicitly turns off the connection, command and data logs in the general 0/0 source — log-connections no, log-commands no, log-data no — and writes no narrow trace blocks.
Recommended values

Three levels:

Line What it writes When to turn on
log-connections connection start and end together with the next one
log-commands commands and replies the first step of diagnosing a connection
log-data bytes as text and in hexadecimal only when line endings or non-printable characters are suspected
The recording levels, their meaning and block examples come from the manual (§ 3.3.7.64–3.3.7.66, § 4.2.2, § 4.2.4). The scheme itself is our hypothesis.
Example configuration
<domain outlook.com>
    log-connections yes
    log-commands yes</domain>
An example from the manual for watching one recipient; the block is removed as soon as the cause is found.
yellow — — directive names, blue — blocks. They are highlighted the same way in the text of the card.
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.
How to check on the node
Check that recording is on only where needed:
grep -rn -B3 'log-commands yes\|log-data yes' /etc/pmta/
A line inside <domain *> or <source 0/0> means recording for the whole node.