Troy writes:
| Qmail enforces the position that SMTP messages should not contain
| bare-newlines at the end of the line, and that instead CRNL pairs should
| be used.  (I'm not about to debate the correctness of this, I really don't
| mind either way).

In SMTP, only "\r\n" delimits an SMTP NVT (network virtual terminal)
line.  This is non-negotiable.  Notice that single a perfectly
correct SMTP line can look like "abc \r def \n ghi \r\n"

This is quite different from what Unix (and Macintosh, and VM/CMS, etc)
thinks "lines" are.  Thus, sometimes buggy software tries to talk SMTP,
but only uses "\n" to delimit "lines", which SMTP then interprets as
yielding one long line with funny whitespace in the middle.

Qmail has two problems with that.  First, for example, the smtp
listener will time out waiting to see the end marker of the data.  It's
supposed to be "\r\n.\r\n", "\n.\n" doesn't count.  Second, qmail's
queue cannot correctly represent valid SMTP lines with "\n" in the
middle, because it stores them in Unix format, not SMTP NVT format.

Thus, qmail enforces the position that SMTP messages shouldn't contain
bare-newlines *anywhere*, even though this rejects certain valid SMTP
messages, in order to catch lots of serious non-qmail bugs, and to
avoid one obscure qmail bug.

| I believe you can also work around this on the server side by getting the
| "fixcr" program from the ucspi-tcp distribution and inserting it in the
| qmail-smtp pipeline.

No, fixcr is very buggy (see list archives).  Don't use it.

Reply via email to