Re: [ietf-smtp] SMTP Reply code 500

Alessandro Vesely <vesely@tana.it> Wed, 04 March 2020 09:10 UTC

Return-Path: <vesely@tana.it>
X-Original-To: ietf-smtp@ietfa.amsl.com
Delivered-To: ietf-smtp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2A39F3A09BC for <ietf-smtp@ietfa.amsl.com>; Wed, 4 Mar 2020 01:10:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.077
X-Spam-Level:
X-Spam-Status: No, score=-2.077 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, T_SPF_HELO_TEMPERROR=0.01, T_SPF_TEMPERROR=0.01, 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 9-TrcSJPnBIK for <ietf-smtp@ietfa.amsl.com>; Wed, 4 Mar 2020 01:10:03 -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 5FBEA3A09A5 for <ietf-smtp@ietf.org>; Wed, 4 Mar 2020 01:10:03 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tana.it; s=delta; t=1583313000; bh=OXYO86DV23TwGvA7OIWowv4XzzacWBCezX/O3qfnKM0=; l=1469; h=To:References:From:Date:In-Reply-To; b=BLWAEQ3PxgxeDdBq+xdOjqvX1r8aQ0U4K0ajYk8iTll+prEXlz1Wv1DGR6LGrLSwh YFpRd60G96zdyfW7bc8lCTUhMRr8otsbuxME+6qi48lZf/kcilfL/qgbcQfpojskBi zJ6heh/E/vn7y33Mn38t9BOTVbIr2Oo6DxK8Y6HphIascs+X7CjSzqFIZ4M+5
Authentication-Results: tana.it; auth=pass (details omitted)
Received: from [172.25.197.111] (pcale.tana [172.25.197.111]) (AUTH: CRAM-MD5 uXDGrn@SYT0/k, TLS: TLS1.2, 128bits, ECDHE_RSA_AES_128_GCM_SHA256) by wmail.tana.it with ESMTPSA id 00000000005DC081.000000005E5F7068.000031B2; Wed, 04 Mar 2020 10:10:00 +0100
To: ietf-smtp@ietf.org
References: <1583290845.3368.15.camel@gmail.com>
From: Alessandro Vesely <vesely@tana.it>
Message-ID: <5e7ff142-82e4-cf2e-2f22-7d8683c176e6@tana.it>
Date: Wed, 4 Mar 2020 10:10:00 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1
MIME-Version: 1.0
In-Reply-To: <1583290845.3368.15.camel@gmail.com>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/ietf-smtp/-lwOtv1LQejwK0Jy_WwKpM3juZw>
Subject: Re: [ietf-smtp] SMTP Reply code 500
X-BeenThere: ietf-smtp@ietf.org
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\]" <ietf-smtp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf-smtp>, <mailto:ietf-smtp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ietf-smtp/>
List-Post: <mailto:ietf-smtp@ietf.org>
List-Help: <mailto:ietf-smtp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf-smtp>, <mailto:ietf-smtp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Mar 2020 09:10:11 -0000

Hi

On Wed 04/Mar/2020 04:00:45 +0100 Geethapriya Liyanage wrote:
> 
> In SMTP communication, normally SMTP client sends commands and SMTP server
> replies to that with reply codes.  As in RFC 5321 , section 4.2.4, if the
> command is not recognized, code 500 should be returned. My doubt is, if the
> SMTP server sends unrecognized command or code to SMTP client , will the client
> also replies the same 500 code.  if not, how the SMTP client should handle it.


SMTP clients can work well by just recognizing the first digit of the reply
code.  "5", in that case, more or less means that the last command failed,
client should stop the transaction if it's in the middle of one, and not retry
sending without prior human intervention.

A client that cannot recognize the first digit of a reply code is not an SMTP
client.

To precisely recognize the meaning of a reply can be useful to fine tune an
SMTP client's behavior.  Interpretation of reply codes can be done by humans
who read the log files or the bounce messages, or by machines.  The so called
extended (or enhanced) status codes, which some servers display between the
reply code and the human readable text string, can help machine interpretation.

Usually, however, the fine-tuning that can result from a correct interpretation
does not affect the immediate future of the current client/server session.  The
first digit is enough to make immediate decisions.


Best,
Ale
--