Knowledge base

Troubleshooting mail reception

Troubleshooting Email Reception/SMTP Feeding Problems
The same tracing, but on the incoming side

Message receiving rarely breaks, and almost always with a home-grown submitting program; the most common error is lines ending with a single LF instead of a CRLF pair.

It is diagnosed with a session recording of one source: a <source> block for the submitting program’s address with log-connections and log-commands shows at which step the transfer fails, and log-data shows every byte with its hexadecimal code. After a reload, the submission is reproduced, the log is read and the block is removed.

The main trap is forgetting to remove the block. The recording does not expire by itself: log-data will keep writing every byte of every submission from this address until the block is deleted.
What the Hub does. The Hub does not enable logging — it is turned off in the templates. Troubleshooting reception, like troubleshooting delivery, is done by hand on the node.
Recommended values

Recording levels:

Line What it shows
log-connections connections and their end
log-commands at which command the failure happens, for example RCPT
log-data bytes: a lone LF, non-printable characters
The most common error, the recording block and the levels come from the manual (§ 4.2.4, § 3.3.7.64–3.3.7.66). The table is ours.
Example configuration
<source 127.0.0.1>
    log-connections yes
    log-commands yes
    log-data yes</source>
An example from the manual; the address is replaced with the submitting program’s address.
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
Reproduce the submission and find it in the log:
pmta reload
tail -100 /var/log/pmta/log
The last command before the break is the step where submission fails; 0a codes without 0d before them are lone LFs.
In the Hub
Cost of a mistake
reversible: harms only while it is set
Scenarios
Receiving inbound mail · Connect a sending platform