🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #80540

Re: Questions about datastream answers (especially to TAKETHIS)

#80540
From: Curt Welch
Date: Fri, 10 Apr 2009 16:08
79 lines
6053 bytes
=?Windows-1252?Q?Julien_=C9LIE?= <iulius@nom-de-mon-site.com.invalid>
> wrote: Hi Curt,
>
> > I have no issue at all with sending 5xx codes back (without the
> > Message-ID argument) for all errors.
> [...]
> > Again, I've not read the RFCs so I'm not making an argument about how
> > all this is specified in the RFC (since I don't know), but just talking
> > from practical experience of writing servers and making them work.
>
> The problem is that currently wide-spread news servers like INN and
> Diablo do not expect such 5xx answers in response to CHECK or TAKETHIS.
> innfeed for instance will keep trying to send the CHECK or TAKETHIS.
>
> Thus, it is difficult to start sending 5xx codes.  How could we make it
> work? News servers should understand 5xx answers first...

Ok, I took a look at some of the code I wrote 10 years ago to see what it
would do and spent some time thinking about this.  I've got to change what
I said before.

Any unexpected result code (including 5xx) is taken to be some sort of
random error from the receiving server and as such, the article is not
thrown away, but kept on the queue.  And at the same time my server would
close the connection and try again after a delay like a minute or more
(under the assumption that something bad was happening).  So if you send
back a 5xx code to my server, it's going to keep trying to send the same
article over and over again as well.

The problem is that it's very important not to accidentally drop articles.
You can't assume you are feeding a server with redundant feeds.  Feeds must
work correctly even if it's only a single feed.  So the sending server has
to error on the side of caution and not drop articles whenever something
unexpected happens.

After thinking a bit more about it, it's clear that the idea at work here
is that if the receiving server doesn't correctly reject the article with
the correct 4xx code, or accept it with the correct 2xx code, then the
article is going to get stuck in the queue and be sent over and over.

So there's just no way given the current state of things, to start ending
5xx result codes to mean "reject article because of bad error".  And I
think the bottom line is that there's really little point to it as well.

The bottom line, is that when receiving a feed, the server must do it's
best to accept whatever is sent, and for all errors such as invalid
message-id or command syntax errors, send back the best reject response you
can or else you could end with a jammed feed.  Unless you think the error
is so bad that you would want to feed to jam.  But normally, when the
sending side can't do what seems to be the "right thing", you want to tell
it to stop bothering you, which means, sending back reject codes.

The other thing I had forgotten because it's been so long since I had to
deal with this, is that many servers do send back extra information on the
reject codes (after the message-id) to explain why it was rejected.  I
don't remember if that practice was part of the standard or not, but over
the years, I ended up adding a lot of special code to my server to look at
that information and do special things with it - but just for logging and
statistic tracking, not for changing the basic nature of the protocol.

For example, some would tell you the article was rejected because it was
too large.  When I saw that, my server would spit out special log messages
that included the size of the article I tried to send.  That made it
possible for me to look at my logs and know what size articles a peer
wanted (and adjust what I was sending them), without having to talk to the
other admin.  I had lots of special code like that in my server.

Because you can send back extra information like that, and at least some
servers (mine :)) would log such data so the admin could see it, then we
have a way already to let the admin of the sending side know his server is
doing bad things without having to do it with 5xx codes.

Is the ability to add information to the end of the result code after the
message-id part of the standard?  Or was it just something people started
doing?

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                                        http://NewsReader.Com/
Technical Details
Message-ID: <20090410120813.401$Y2@newsreader.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!198.186.194.249.MISMATCH!transit3.readnews.com!news-xxxfer.readnews.com!news-out.readnews.com!postnews3.readnews.com!nr5-q1.newsreader.com.POSTED!not-for-mail
References: <gq0tnk$kp3$1@news.trigofacile.com> <877i2knd8m.fsf@windlord.stanford.edu> <gq10do$n5p$1@news.trigofacile.com> <87ab7fnbjk.fsf@windlord.stanford.edu> <gq18h4$un2$1@news.trigofacile.com> <87wsajk9lu.fsf@windlord.stanford.edu> <gq273p$s8o$1@news.trigofacile.com> <87k56iip3i.fsf@windlord.stanford.edu> <gq5813$nhj$1@news.trigofacile.com> <20090409151121.399$6P@newsreader.com> <grmnm5$qt7$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <20090410120813.401$Y2@newsreader.com>
Subject: Re: Questions about datastream answers (especially to TAKETHIS)
Date: Fri, 10 Apr 2009 16:08:10 +0000
From: curt@kcwc.com (Curt Welch)
References: <gq0tnk$kp3$1@news.trigofacile.com> <877i2knd8m.fsf@windlord.stanford.edu> <gq10do$n5p$1@news.trigofacile.com> <87ab7fnbjk.fsf@windlord.stanford.edu> <gq18h4$un2$1@news.trigofacile.com> <87wsajk9lu.fsf@windlord.stanford.edu> <gq273p$s8o$1@news.trigofacile.com> <87k56iip3i.fsf@windlord.stanford.edu> <gq5813$nhj$1@news.trigofacile.com> <20090409151121.399$6P@newsreader.com> <grmnm5$qt7$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!198.186.194.249.MISMATCH!transit3.readnews.com!news-xxxfer.readnews.com!news-out.readnews.com!postnews3.readnews.com!nr5-q1.newsreader.com.POSTED!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-NRC-Trace: NewsReader.Com K7vuqx+VSiWGI, ylZ4oId5g026@52SEslkS@nI_VxAvW+fkQ-6
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,
 ?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5
 %IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Lines: 79
NNTP-Posting-Host: 7d3a4d33.nr5-q1.newsreader.com
X-Trace: DXC=W:\W:jdV4CT3b9DWd_8@3_bgZaH`e<A[YZ?:i9<JJBS^CXbhaQ]0oG\5^Ah^J`E7[Z8JoCcKhIc5WDAS_N;
 FgB3Q
X-Complaints-To: abuse@newsreader.com