From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 8FFA31F406; Fri, 10 Nov 2023 18:43:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1699641786; bh=wcmsRj+dSCW9GrqB/u+4rpC+koyLX7zYnkpBEjIDfTU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aYfxUScP8bzBZhT9i7FYlDFb0jfiKLf5izmCGK3mAqeuNSNu7OelNxqX4Djq2wsOF A9thTVq0XJE2Ddd8Ov2ExciHMX27FjaeZPlqKgONEwMnVL00J0vCoDj7e08WWrzCvf JPrn+aPuTvaNUyFfDq7DdhJc6TU4KpVBCY4eqG2o= Date: Fri, 10 Nov 2023 18:43:06 +0000 From: Eric Wong To: Leah Neukirchen Cc: meta@public-inbox.org Subject: Re: [PATCH] public-inbox-mda: use status codes where applicable Message-ID: <20231110184306.M509327@dcvr> References: <20180612153652.29719-1-leah@vuxu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180612153652.29719-1-leah@vuxu.org> List-Id: Leah Neukirchen wrote: > Many MTA understand these and map them to sensible SMTP error messages. > > Inability to find an inbox results in "5.1.1 user unknown". > Misformatted messages are rejected with "5.6.0 data format error". > Unsupported inbox versions are reported as "5.3.5 local configuration error". > > All of these are interpreted as permanent failures. Resurrecting an ancient topic... > diff --git a/script/public-inbox-mda b/script/public-inbox-mda > index 766d58a..1f1252a 100755 > --- a/script/public-inbox-mda > +++ b/script/public-inbox-mda > @@ -38,8 +38,8 @@ my $config = PublicInbox::Config->new; > my $recipient = $ENV{ORIGINAL_RECIPIENT}; > defined $recipient or die "ORIGINAL_RECIPIENT not defined in ENV\n"; Btw, our current code still dies if ORIGINAL_RECIPIENT is unset instead of using a sysexit.h code. Should that be changed to EX_USAGE or EX_NOUSER instead of die? Since we already use EX_NOUSER right below: > my $dst = $config->lookup($recipient); # first check > -defined $dst or do_exit(1); > -my $main_repo = $dst->{mainrepo} or do_exit(1); > +defined $dst or do_exit(67); # EX_NOUSER 5.1.1 user unknown > +my $main_repo = $dst->{mainrepo} or do_exit(67); Just something I noticed this while making unrelated changes to -mda...