Re: [ietf-smtp] SMTP Reply code 500

Paul Smith <paul@pscs.co.uk> Wed, 04 March 2020 09:39 UTC

Return-Path: <paul@pscs.co.uk>
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 2EE5C3A0AAA for <ietf-smtp@ietfa.amsl.com>; Wed, 4 Mar 2020 01:39:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.1
X-Spam-Level:
X-Spam-Status: No, score=-2.1 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=pscs.co.uk
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 MkHFLs1n4vQM for <ietf-smtp@ietfa.amsl.com>; Wed, 4 Mar 2020 01:39:21 -0800 (PST)
Received: from mail.pscs.co.uk (mail.pscs.co.uk [195.224.19.137]) (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 047A63A0A6F for <ietf-smtp@ietf.org>; Wed, 4 Mar 2020 01:39:17 -0800 (PST)
Authentication-Results: mail.pscs.co.uk; spf=none; auth=pass (cram-md5) smtp.auth=pscs
Received: from lmail.pscs.co.uk ([192.168.66.70]) by mail.pscs.co.uk ([10.224.19.137] running VPOP3) with ESMTPSA (TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384) for <ietf-smtp@ietf.org>; Wed, 4 Mar 2020 09:39:13 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pscs.co.uk; q=dns/txt; s=lmail; h=Subject:To:References:From:Message-ID:Date:MIME-Version:In-Reply-To :Content-Type:Content-Transfer-Encoding:Cc:Reply-to:Sender; t=1583314433; x=1583919233; bh=CgyWev8YJ5YU5GzVHmykoTAans1g/WL5uJyp9kpnVpw=; b=RGrAqL7bFnDJ2aQUGWfAjJok/Ta4Eat7r9es+BK69gQ+W+zg98ueF+FXt9Yp1jTKq2qtABNu Du8HN8qAKRkzBeuVAS08K/r9i141FEq1JESRjZHUXVoFvfKynXfo/HE3mCH/qItTFQNOQ9UKiA /oVdLjq9dyd9jHqIgfTydbZNU=
Authentication-Results: lmail.pscs.co.uk; spf=none; auth=pass (cram-md5) smtp.auth=paul
Received: from [192.168.66.100] ([192.168.66.100]) by lmail.pscs.co.uk ([192.168.66.70] running VPOP3) with ESMTPSA (TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384) for <ietf-smtp@ietf.org>; Wed, 4 Mar 2020 09:33:51 -0000
To: ietf-smtp@ietf.org
References: <1583290845.3368.15.camel@gmail.com>
From: Paul Smith <paul@pscs.co.uk>
Message-ID: <aedd19df-c406-2513-934e-4498ae159964@pscs.co.uk>
Date: Wed, 4 Mar 2020 09:33:49 +0000
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0
MIME-Version: 1.0
In-Reply-To: <1583290845.3368.15.camel@gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Content-Language: en-GB
X-Authenticated-Sender: paul
X-Server: VPOP3 Enterprise V7.10 - Registered
X-Organisation: Paul Smith Computer Services
X-VPOP3Tester: 12 345
X-Authenticated-Sender: pscs
Archived-At: <https://mailarchive.ietf.org/arch/msg/ietf-smtp/mkDL_ZgIB-J6_h2yCtTpuSTS1Ko>
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:39:38 -0000

On 04/03/2020 03:00, 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.

An SMTP server will never send a command to the SMTP client. That's just 
not SMTP. In SMTP, the client sends commands, the server sends 
responses, which all start with a three digit number where the first 
digit is 1 to 5

A buggy SMTP server could send an invalid response to the SMTP client  
(ie a response not starting with a three digit number beginning with 1 
to 5). In that case, the SMTP client should do whatever it wants to do, 
ranging from ignoring it, to dropping the connection in disgust and 
reporting an error to the user/administrator/log/whatever (I'd probably 
advocate for the latter).



-- 


Paul Smith Computer Services
Tel: 01484 855800
Vat No: GB 685 6987 53

Sign up for news & updates at http://www.pscs.co.uk/go/subscribe