Re: [ietf-smtp] SMTP server reply extensions

Timo Sirainen <timo@sirainen.com> Fri, 10 April 2020 18:18 UTC

Return-Path: <timo@sirainen.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 1DC9E3A0C63 for <ietf-smtp@ietfa.amsl.com>; Fri, 10 Apr 2020 11:18:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-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 NiOY4Hg7OXW9 for <ietf-smtp@ietfa.amsl.com>; Fri, 10 Apr 2020 11:18:48 -0700 (PDT)
Received: from sirainen.com (mail.sirainen.com [94.237.26.55]) by ietfa.amsl.com (Postfix) with ESMTP id 7B7553A0C2D for <ietf-smtp@ietf.org>; Fri, 10 Apr 2020 11:18:48 -0700 (PDT)
Received: from [192.168.8.101] (unknown [86.115.71.213]) by sirainen.com (Postfix) with ESMTPSA id 5B5582B3C8B; Fri, 10 Apr 2020 18:18:47 +0000 (UTC)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\))
From: Timo Sirainen <timo@sirainen.com>
In-Reply-To: <01RJJBJ305QW000058@mauve.mrochek.com>
Date: Fri, 10 Apr 2020 21:18:46 +0300
Cc: ietf-smtp@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <402434A7-5F3C-4DC8-9DF1-5B0DDFC5BAC9@sirainen.com>
References: <8CF389F4-7BD3-44D0-85F4-91E66120A59B@sirainen.com> <8f52f073-72f1-3813-bd52-217cb2ff4419@wizmail.org> <578702286F283486C2F8D7B0@PSB> <63ED9C33-EE62-48FD-B176-E698C7D609B9@sirainen.com> <01RJJBJ305QW000058@mauve.mrochek.com>
To: Ned Freed <ned.freed@mrochek.com>
X-Mailer: Apple Mail (2.3608.60.0.2.5)
Archived-At: <https://mailarchive.ietf.org/arch/msg/ietf-smtp/QZa2Bv64MiM3OEo9-Jns776thHE>
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: Fri, 10 Apr 2020 18:18:57 -0000

On 10. Apr 2020, at 18.43, Ned Freed <ned.freed@mrochek.com> wrote:
> 
> I guess I'm missing something pretty fundamental here, because I don't see why
> any of this is necessary.
> 
> We have a model for extending SMTP/LMTP that includes private extensions:
> Advertise the extension in the EHLO/LHO response, then enable the extension
> either with a new command or parameter. There's essentially no limit on what an
> extension can do, and it certainly includes enabling the use of structured
> information in certain replies.

Sure, I was just hoping to find a way to avoid designing a horribly non-SMTP like extension, even if it was a private one.

> Of course it makes sense to reuse existing structured syntax when possible. As
> for reusing existing enhanced status code, I'm really not on board with that -
> I think new values are the right way to do it, and that once again we've been
> guilty of integer-hoarding. (We really should have reserved a range for private
> use, but there are enough values that it's difficult to get excited about
> this.)

So you are recommending not using the 551 code for the redirection purpose?

Hmm. Now thinking further about this, I'm not sure 551 would be enough for my purposes either. I think I'm going to need multiple different things returned in the reply. So maybe I'll do it with a new private response code also. Any recommendations what private codes to use? Maybe x.y.100 and over?

> FWIW, we have the same redirect/referral issue in our software when a user has
> been moved, but the LMTP server only knows it's the wrong place for a given
> recipient. So what we do is signal that fact using a special private reply
> code.

Until now Dovecot's proxies have been responsible for knowing which backend is correct and backends haven't done any extra verifications. But I'm now doing some redesigning of how clustering works and this extra information in replies can be useful in some situations.