Knowledge base

The line ending requirement

line termination in submitted mail
The most common submission error

The manual calls ending lines with a single LF instead of the CRLF pair required by mail standards the most common error of a program that submits messages to the node.

It is diagnosed with a session recording: a <source> block for the submitting program’s address with log-connections and log-commands shows at which transfer step — for example, at the RCPT command — the failure happens, and log-data prints every byte with its hexadecimal code, so the missing CR becomes visible.

The submission bindings are more forgiving here: with 7-bit and 8-bit encodings they convert a lone LF to CRLF themselves.

The main trap is testing the program only through a binding. The binding fixes a lone LF itself, and the error is invisible; the same program submitting over SMTP will start failing.
What the Hub does. The Hub itself submits warm-up messages to the node over SMTP, so this requirement applies to it too; on someone else’s platform it is the first thing to check when submission fails strangely.
Recommended values

What to turn on for diagnosis:

Directive What it writes
log-connections connections
log-commands commands and replies
log-data data with hexadecimal byte codes
The most common error and diagnosis with a session recording come from the manual (§ 4.2.4); LF conversion in the bindings is § 7.4.10. The trap analysis is ours.
Example configuration
<source 127.0.0.1>
    log-connections yes
    log-commands yes
    log-data yes</source>
An example from the manual; after the edit the configuration is reloaded, and 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
With recording on, look at the session in the log:
pmta reload
tail -100 /var/log/pmta/log
In the data recording, CR and LF show as the codes 0d and 0a: a lone 0a without 0d before it is an error of the submitting program. The log path comes from log-file.
In the Hub
Cost of a mistake
safe: a wrong value breaks nothing
Scenarios
Connect a sending platform