Re: [Emailcore] Ticket #5: G.5. Remove or deprecate the work-around from code 552 to 452?

Alessandro Vesely <vesely@tana.it> Tue, 19 January 2021 17:47 UTC

Return-Path: <vesely@tana.it>
X-Original-To: emailcore@ietfa.amsl.com
Delivered-To: emailcore@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3F8A63A1672 for <emailcore@ietfa.amsl.com>; Tue, 19 Jan 2021 09:47:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.382
X-Spam-Level:
X-Spam-Status: No, score=-2.382 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, NICE_REPLY_A=-0.262, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1152-bit key) header.d=tana.it
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iHmv0C_PFkVk for <emailcore@ietfa.amsl.com>; Tue, 19 Jan 2021 09:47:21 -0800 (PST)
Received: from wmail.tana.it (wmail.tana.it [62.94.243.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 084943A175A for <emailcore@ietf.org>; Tue, 19 Jan 2021 09:47:01 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tana.it; s=delta; t=1611078420; bh=SQCeWrzNzopJcHvr5oqvWYGMlB9IPdkvhEtKUM9X1HM=; l=2872; h=To:References:From:Date:In-Reply-To; b=BEkWUC5ebJiBGbY7z+hWSziUBl1LiMqQuLL7PVij08KxRo0CEamrpFItzJHpAxsh3 7qRNtUiajorU/C9TeDVa40keFMBXtB+x3+IkiSanSZ9kuLzpBKTEhPj98xcfZtWxkW XQNZtJ+3I3BsPxCXV1Yn7+VtUYhZEGZbddwX/wlPDRDg11ax3KJ9CFqFx9FHr
Authentication-Results: tana.it; auth=pass (details omitted)
Original-From: Alessandro Vesely <vesely@tana.it>
Received: from [172.25.197.111] (pcale.tana [172.25.197.111]) (AUTH: CRAM-MD5 uXDGrn@SYT0/k, TLS: TLS1.3, 128bits, ECDHE_RSA_AES_128_GCM_SHA256) by wmail.tana.it with ESMTPSA id 00000000005DC0C3.0000000060071B14.00005069; Tue, 19 Jan 2021 18:47:00 +0100
To: emailcore@ietf.org
References: <ca851fda-63ac-8739-c3eb-bde725aa25f3@isode.com>
From: Alessandro Vesely <vesely@tana.it>
Message-ID: <c31c54ee-a8aa-36ca-ba95-6d6ee1042fdc@tana.it>
Date: Tue, 19 Jan 2021 18:46:59 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0
MIME-Version: 1.0
In-Reply-To: <ca851fda-63ac-8739-c3eb-bde725aa25f3@isode.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/emailcore/RaZkGlH-gydrUy4j1DolG_n_tbA>
Subject: Re: [Emailcore] Ticket #5: G.5. Remove or deprecate the work-around from code 552 to 452?
X-BeenThere: emailcore@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: EMAILCORE proposed working group list <emailcore.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/emailcore>, <mailto:emailcore-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/emailcore/>
List-Post: <mailto:emailcore@ietf.org>
List-Help: <mailto:emailcore-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/emailcore>, <mailto:emailcore-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jan 2021 17:47:23 -0000

On Tue 19/Jan/2021 17:24:55 +0100 Alexey Melnikov wrote:
> 
> The first pagaraph of Section 4.5.3.1.10 (Too Many Recipients Code) currently 
> says:
> 
>     RFC 821 [3] incorrectly listed the error where an SMTP server
>     exhausts its implementation limit on the number of RCPT commands
>     ("too many recipients") as having reply code 552.  The correct reply
>     code for this condition is 452.  Clients SHOULD treat a 552 code in
>     this case as a temporary, rather than permanent, failure so the logic
>     below works.
> 
> John noted that this suggestion may have outlived its usefulness
> and/or be inconsistent with current practice. Should it be removed
> and/or explicitly deprecated?


Yes, at least the last sentence (Clients... works.) should go away.

In that case, the parenthesized snippets two paragraphs below should be removed 
to.  The end of that section is not clear to me.  AIUI, I'd change it like so:

OLD:
    If an SMTP server has an implementation limit on the number of RCPT
    commands and this limit is exhausted, it MUST use a response code of
    452 (but the client SHOULD also be prepared for a 552, as noted
    above).  If the server has a configured site-policy limitation on the
    number of RCPT commands, it MAY instead use a 5yz response code.  In
    particular, if the intent is to prohibit messages with more than a
    site-specified number of recipients, rather than merely limit the
    number of recipients in a given mail transaction, it would be
    reasonable to return a 503 response to any DATA command received
    subsequent to the 452 (or 552) code or to simply return the 503 after
    DATA without returning any previous negative response.


NEW:
    If an SMTP server has an implementation limit on the number of RCPT
    commands and this limit is exhausted, it MUST use a response code of
    452.  If the server has a configured site-policy limitation on the
    number of RCPT commands, it MAY instead use a 5yz response code.  In
    particular, if the intent is to prohibit messages with more than a
    site-specified number of recipients, rather than merely limit the
    number of recipients in a given mail transaction, it would be
    reasonable to return a 503 response to any DATA command received
    subsequent to the 552 code.

I omitted "or to simply return the 503 after DATA without returning any 
previous negative response."  503 is "Bad sequence of commands".  The omitted 
phrase says it makes sense to issue 503 after a sequence of positive RCPTs, and 
I cannot see anything wrong in that sequence.

552 makes sense if, in response to the nth RCPT command, the server got a 
memory fault.  For example, it called realloc() with a size argument of 0 due 
to overflow, realloc() returned NULL, so the server lost the whole buffer and 
replied 552.  It could not accept DATA.


Best
Ale
--