From: Eric Wong <e@80x24.org>
To: Leah Neukirchen <leah@vuxu.org>
Cc: meta@public-inbox.org
Subject: Re: [PATCH] public-inbox-mda: use <sysexits.h> status codes where applicable
Date: Fri, 10 Nov 2023 18:43:06 +0000 [thread overview]
Message-ID: <20231110184306.M509327@dcvr> (raw)
In-Reply-To: <20180612153652.29719-1-leah@vuxu.org>
Leah Neukirchen <leah@vuxu.org> 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...
next prev parent reply other threads:[~2023-11-10 18:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-12 15:36 [PATCH] public-inbox-mda: use <sysexits.h> status codes where applicable Leah Neukirchen
2018-06-13 1:18 ` Eric Wong
2023-11-10 18:43 ` Eric Wong [this message]
2023-11-10 21:32 ` Leah Neukirchen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231110184306.M509327@dcvr \
--to=e@80x24.org \
--cc=leah@vuxu.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).