Re: [ietf-smtp] Stray <LF> in the middle of messages

Alessandro Vesely <> Mon, 08 June 2020 16:22 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 2D8723A0CE1 for <>; Mon, 8 Jun 2020 09:22:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1152-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id RbyzpzSP7Y7s for <>; Mon, 8 Jun 2020 09:22:49 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id B6F073A0884 for <>; Mon, 8 Jun 2020 09:22:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=delta; t=1591633367; bh=U+LeNMKIXIUK+3JaOskOD+XKpQw0nEysjGjQofBCzqU=; l=674; h=To:References:From:Date:In-Reply-To; b=BLvew4Hbxz/2Gdd03bsrLlezyrsnQwXWnnKjFC0YR0HIC96bQ22Ia4PPL1ntp4z0B gCpVcQg8Bd1IkkWglcTbrynDGjE16s/okPi8hMGBQn+r2VmAAKCsbfyrVYlOEdUTPM yabeaiS/fGEl8t7hTZfs2qEHSQC6K4A5BMJWRUv5ymEMFKQgWLAgTtMbh+4Zz
Authentication-Results:; auth=pass (details omitted)
Received: from [] (pcale.tana []) (AUTH: CRAM-MD5 uXDGrn@SYT0/k, TLS: TLS1.2, 128bits, ECDHE_RSA_AES_128_GCM_SHA256) by with ESMTPSA id 00000000005DC07E.000000005EDE65D7.000057EE; Mon, 08 Jun 2020 18:22:47 +0200
References: <> <>
From: Alessandro Vesely <>
Message-ID: <>
Date: Mon, 8 Jun 2020 18:22:47 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Archived-At: <>
Subject: Re: [ietf-smtp] Stray <LF> in the middle of messages
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of issues related to Simple Mail Transfer Protocol \(SMTP\) \[RFC 821, RFC 2821, RFC 5321\]" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Mon, 08 Jun 2020 16:22:51 -0000

On Mon 08/Jun/2020 16:03:49 +0200 Hector Santos wrote:
> While the *nix or Mac may store the email in their native format, when it comes
> to SMTP transmission of the DATA payload , they MUST translate  it to a
> <CR><LF> format. In principle, all compliant SMTP senders and receiver MUST
> conform to the <CR><LF> end of line terminator.

CRLF is required for IMAP and POP too.  The inconvenience is having to compute
the length of the message, in octets.  The FS can only tell how many octets the
native format takes.  One has to add the number of lines.  Storing that info in
the file name is a possibility, if you don't have a dedicated FS.