Re: [ietf-smtp] SMTP status codes 251 and 551

Viktor Dukhovni <ietf-dane@dukhovni.org> Fri, 14 February 2020 15:32 UTC

Return-Path: <ietf-dane@dukhovni.org>
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 3A54D1200FE for <ietf-smtp@ietfa.amsl.com>; Fri, 14 Feb 2020 07:32:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.199
X-Spam-Level:
X-Spam-Status: No, score=-4.199 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, 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 0xp3PXR_51Bu for <ietf-smtp@ietfa.amsl.com>; Fri, 14 Feb 2020 07:32:55 -0800 (PST)
Received: from straasha.imrryr.org (straasha.imrryr.org [100.2.39.101]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 56F171200EB for <ietf-smtp@ietf.org>; Fri, 14 Feb 2020 07:32:55 -0800 (PST)
Received: from [192.168.1.161] (unknown [192.168.1.161]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by straasha.imrryr.org (Postfix) with ESMTPSA id C5BBB4BBC8 for <ietf-smtp@ietf.org>; Fri, 14 Feb 2020 10:32:53 -0500 (EST)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\))
From: Viktor Dukhovni <ietf-dane@dukhovni.org>
In-Reply-To: <071b63b5-1c89-4b01-b903-7162acbc021b@tana.it>
Date: Fri, 14 Feb 2020 10:32:52 -0500
Content-Transfer-Encoding: quoted-printable
Reply-To: ietf-smtp@ietf.org
Message-Id: <A6CDD65C-61E4-4181-941D-0856234BC13D@dukhovni.org>
References: <20200211024558.C17841408245@ary.qy> <071b63b5-1c89-4b01-b903-7162acbc021b@tana.it>
To: ietf-smtp@ietf.org
X-Mailer: Apple Mail (2.3608.60.0.2.5)
Archived-At: <https://mailarchive.ietf.org/arch/msg/ietf-smtp/p3QwO4G3o5-FEm33W7RmHOwmJ8E>
Subject: Re: [ietf-smtp] SMTP status codes 251 and 551
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, 14 Feb 2020 15:32:58 -0000

> On Feb 11, 2020, at 4:52 AM, Alessandro Vesely <vesely@tana.it> wrote:
> 
> Using Courier-MTA, I'd have to devise a new add-on in order to issue these
> responses using configured forward addresses.  Do Sendmail or Postfix provide
> for email address portability?

Postfix supports a "relocated_maps" feature, which aims to refer the
bounce recipient to a more appropriate address:

	http://www.postfix.org/postconf.5.html#relocated_maps

When a RCPT TO hits a listed address it looks like the response will be:

	550 5.1.6 User has moved to <lookup result>

The 5.1.6 is determined in the mailer triple resolution code, which is
is SMTP independent, and 3-digit SMTP reply code is determined in the
SMTP engine, which maps replies with 550 for all addresses that
resolve to the error channel.

   https://tools.ietf.org/html/rfc3463#section-3.2

        X.1.6   Destination mailbox has moved, No forwarding address

         The mailbox address provided was at one time valid, but mail is
         no longer being accepted for that address.  This code is only
         useful for permanent failures.

But the result is correct, Postfix is not returning a machine-readable
551 referral, it is returning a human readable[1] 550 reject.

-- 
	Viktor.

[1] By humans who can read and understand a short English phrase.