Re: [ietf-smtp] SMTP server reply extensions

John C Klensin <john-ietf@jck.com> Wed, 08 April 2020 17:04 UTC

Return-Path: <john-ietf@jck.com>
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 663653A10C8 for <ietf-smtp@ietfa.amsl.com>; Wed, 8 Apr 2020 10:04:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 g0cIglzu6yLX for <ietf-smtp@ietfa.amsl.com>; Wed, 8 Apr 2020 10:04:48 -0700 (PDT)
Received: from bsa2.jck.com (ns.jck.com [70.88.254.51]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 442183A108F for <ietf-smtp@ietf.org>; Wed, 8 Apr 2020 10:04:48 -0700 (PDT)
Received: from [198.252.137.10] (helo=PSB) by bsa2.jck.com with esmtp (Exim 4.82 (FreeBSD)) (envelope-from <john-ietf@jck.com>) id 1jME84-0008V5-GA; Wed, 08 Apr 2020 13:04:44 -0400
Date: Wed, 08 Apr 2020 13:04:38 -0400
From: John C Klensin <john-ietf@jck.com>
To: Jeremy Harris <jgh@wizmail.org>, ietf-smtp@ietf.org
Message-ID: <578702286F283486C2F8D7B0@PSB>
In-Reply-To: <8f52f073-72f1-3813-bd52-217cb2ff4419@wizmail.org>
References: <8CF389F4-7BD3-44D0-85F4-91E66120A59B@sirainen.com> <8f52f073-72f1-3813-bd52-217cb2ff4419@wizmail.org>
X-Mailer: Mulberry/4.0.8 (Win32)
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
X-SA-Exim-Connect-IP: 198.252.137.10
X-SA-Exim-Mail-From: john-ietf@jck.com
X-SA-Exim-Scanned: No (on bsa2.jck.com); SAEximRunCond expanded to false
Archived-At: <https://mailarchive.ietf.org/arch/msg/ietf-smtp/DIcbsnF_XJECzNaEC7NA7SpfrBc>
Subject: Re: [ietf-smtp] SMTP server reply extensions
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, 08 Apr 2020 17:04:53 -0000


--On Wednesday, April 8, 2020 15:31 +0100 Jeremy Harris
<jgh@wizmail.org> wrote:

> On 08/04/2020 15:00, Timo Sirainen wrote:
>> 1. IMAP-like login referrals (RFC 2221)
>> 
>> This RFC isn't really used nowadays, but I'm now thinking of
>> using referrals internally in Dovecot clusters. Dovecot
>> backend could send a referral and Dovecot proxy would
>> reconnect to that referral instead. But the same thing is
>> needed also for LMTP, which means that it would have to be
>> sent in a RCPT TO reply since the redirection can be
>> different for different users. Perhaps something like:
>> 
>> RCPT TO:<user@example.com>
>> 250 2.1.5 OK
>> RCPT TO:<user2@example2.com>
>> 450 4.4.4 [REFERRAL smtp://backend2/] Redirected
>> RCPT TO:<user3@example3.com>
>> 450 4.4.4 [REFERRAL smtp://backend3/] Redirected
> 
> Perhaps this?
> 
> RFC 4321 Section 4.2.3
>   551  User not local; please try <forward-path>

Jeremy, 

Thanks although I assume "4321" is a typo and your meant "5321".

The more general issue is that there has been a long-standing
principle of the SMTP design that, unless situation-specific
information is actually needed (and that use of 551 is one of
the exceptions), the codes contain most or the information and
are what is important, not the text.  That is important because
it avoids the SMTP-sender having to do natural language
processing and because it largely eliminates the need to worry
about internationalization (and hence translation) of the text
strings.  Of course the "act on the first digit only" rule is
intended to put even less burden on the SMTP-sender as well as
providing robustness against the SMTP-receiver using codes that
the SMTP-receiver has not been upgraded to understand
specifically. 

I've read through Timo's note a few times with the above as
context and I'm not sure I see the fit between what I think he
is proposing and SMTP.

First, a 4yz code implies that the sender should requeue the
message and try again later.  It is not an intermediate
processing indication of some variety with the implication that
the server is retaining responsibility for getting the message
delivered.   SMTP, by design (and long before me) does not have
such intermediate processing indications in reply codes;
inventing one or a series of them (1yz, perhaps?) would be a
rather major change to the standard and would probably break
SMTP-senders who have assumed there are only codes starting in
2, 3, 4, or 5 since the publication of RFC 821 in 1982.

Second, if the above is ignored, it would seem to me that the
right way to do at least part of this would be to use extended
status codes based on RFC 3463 and the registry established by
RFC 5428.

Finally, the information shown in that example looks a lot more
like trace information to me than like anything appropriate to a
reply code.  Normally, track information ends up on the hands of
someone on the far side of the SMTP-receiver.  But I can see no
reason (other than creating an opportunity for noise, blowback,
and spam if not done carefully) why one could not build a
Delivery Status Notification containing that type of trace
material and send it to the message originator or the
SMTP-sender.  No change to SMTP required.

Timo, if Jeremy's comment and that explanation do not answer
your question/ proposal, could you explain a bit more?

thanks,
   john