On 09/28/2010 10:45 PM, Murray S. Kucherawy wrote:
(If this would be better asked on postfix-devel, let me know and I'll
repost it there.)
What does Postfix do with a message that has a malformed header? If
for example there's a header that's found to contain a line whose
first character is alphanumeric (thus not a continuation) but contains
no colon, is this treated as a header field, or does this cause the
header to end and the body to begin, or something else?
Did you test it ?
It's trivial to test with telnet.
Postfix silently starts the body of the mail at the first non-header.
I'm pretty sure sendmail, for example, ends the header there and
begins the body such that the malformed line is the first line of the
body,
Postfix emulates sendmail behaviour to an uncanny degree, then.
If there's consensus among popular MTAs about what to do, maybe this
should be documented someplace more formally.
The relevant RFCs contain useful information, the most telling of which
is that the debate on what to do with malformed mail has not abated
since the inception of SMTP in the late 70s.
This means that there is no "consensus" - there are too many differing
opinions.
Postfix obviously falls squarely on the side of "don't drop malformed
mail unless it is technically undeliverable", which I find not unreasonable.
--
J.