Article View: news.software.nntp
Article #81139Re: Have I to issue a GROUP command before POSTing?
From: Julien ÉLIE
Date: Sat, 30 May 2009 12:20
Date: Sat, 30 May 2009 12:20
232 lines
10649 bytes
10649 bytes
Hi Mateusz,
>> CASE "XOVER", "OVER"
>> Xover(LastCommand(2))
>>
>> Be careful XOVER and OVER are not the same commands.
>
> Again, you're right... I though that RFC 3977 simply took OVER from the
> XOVER specification (RFC 2980), but indeed, I see now that XOVER works only
> on ranges, while OVER may also take a MsgID as a parameter... I will fix
> that.
>
>> GROUP fr.test
>> 211 7501 1760 10030 fr.test
>> OVER 1
>> 423 No articles in 1
>> XOVER 1
>> 224 No articles in 1
>> .
>
> Seems wrong there..
> RFC 2980 states that: "If no articles are in the range specified, a 420
> error response is returned by the server." (about the XOVER command).
:)
Yeah, I know. The problem is that RFC 2980 is wrong.
XOVER definitely answers 224 with no articles after.
In case you answer 420 to XOVER here, you will probably break some clients
(Outlook Express/Windows Mail gives an error to the user, Thunderbird
silently fails [it sends XOVER and, just after, an unnecessary HEAD,
which returns 423]).
RFC 2980 was written a posteriori and got a few stuff wrong. Current NNTP
implementations are right and it is what you should look at for commands
not detailed in RFC 3977, 4642, 4643 or 4644. That's one of the reasons
why XOVER was standardized as OVER because you cannot change return codes
for existing widely-used commands. With a new command name, we can start
from nought and fix historic problems.
Note that INN, Diablo and Dnews use 224. (Columbus nntp.perl.org uses 420
as far as I know.)
By the way, 420 means that the current article number is invalid (not
selected) whereas 423 means that there is no such article number in
the group. 423 would then be a better answer for XOVER, but never
mentioned in RFC 2980.
Do not trust RFC 2980! Trust existing implementations!
>> PRINT "101 Capability list:" + CRLF;
>> PRINT "VERSION 2" + CRLF;
>> PRINT "READER" + CRLF;
>> PRINT "LIST ACTIVE NEWSGROUPS OVERVIEW.FMT" + CRLF;
>> PRINT "OVER" + CRLF;
>> PRINT "." + CRLF;
>>
>> No "POST"? (when WriteAccess = 1)
>
> I though about that, but I found no mention in any RFC, telling that "POST"
> may be advertised, so I assumed that advertising "READER" is implicitly
> telling that the POST command is supported...
> Do you have any sources which would indicate POST as a valid advertisment?
Sure!
In RFC 3977:
3.3.2. Standard Capabilities
POST
This capability indicates that the server implements the POST
command.
5.2.3. Examples
Example of a response from a server that has a range of facilities
and that also describes itself:
[C] CAPABILITIES
[S] 101 Capability list:
[S] VERSION 2
[S] READER
[S] IHAVE
[S] POST
[S] NEWNEWS
[S] LIST ACTIVE NEWSGROUPS ACTIVE.TIMES OVERVIEW.FMT
[S] IMPLEMENTATION INN 4.2 2004-12-25
[S] OVER MSGID
[S] STREAMING
[S] XSECRET
[S] .
6.3.1. POST
6.3.1.1. Usage
Indicating capability: POST
9.5. Capability Lines
capability-entry =/
post-capability
post-capability = "POST"
Appendix B. Summary of Commands
+-------------------+-----------------------+---------------+
| Command | Indicating capability | Definition |
+-------------------+-----------------------+---------------+
| ARTICLE | READER | Section 6.2.1 |
| BODY | READER | Section 6.2.3 |
| CAPABILITIES | mandatory | Section 5.2 |
| DATE | READER | Section 7.1 |
| GROUP | READER | Section 6.1.1 |
| HDR | HDR | Section 8.5 |
| HEAD | mandatory | Section 6.2.2 |
| HELP | mandatory | Section 7.2 |
| IHAVE | IHAVE | Section 6.3.2 |
| LAST | READER | Section 6.1.3 |
| LIST | LIST | Section 7.6.1 |
| LIST ACTIVE.TIMES | LIST | Section 7.6.4 |
| LIST ACTIVE | LIST | Section 7.6.3 |
| LIST DISTRIB.PATS | LIST | Section 7.6.5 |
| LIST HEADERS | HDR | Section 8.6 |
| LIST NEWSGROUPS | LIST | Section 7.6.6 |
| LIST OVERVIEW.FMT | OVER | Section 8.4 |
| LISTGROUP | READER | Section 6.1.2 |
| MODE READER | MODE-READER | Section 5.3 |
| NEWGROUPS | READER | Section 7.3 |
| NEWNEWS | NEWNEWS | Section 7.4 |
| NEXT | READER | Section 6.1.4 |
| OVER | OVER | Section 8.3 |
| POST | POST | Section 6.3.1 |
| QUIT | mandatory | Section 5.4 |
| STAT | mandatory | Section 6.2.4 |
+-------------------+-----------------------+---------------+
I hope this last table will help :)
There also exist STREAMING, AUTHINFO USER, AUTHINFO SASL and STARTTLS.
>> And "AUTHINFO USER", in case you wish to advertise it?
>
> Good idea! I missed that one :)
Note that you are not required to advertise it, because of that note:
The "USER" argument indicates that AUTHINFO USER/PASS is supported as
defined by Section 2.3 of this document. The "USER" argument MUST
NOT be advertised, and the AUTHINFO USER/PASS commands SHOULD NOT be
provided, unless a strong encryption layer (e.g., Transport Layer
Security (TLS) [NNTP-TLS]) is in use or backward compatibility
dictates otherwise.
INN 2.5.0 for instance advertises AUTHINFO USER even though a secure layer
is not used. (It is not advertised only when the require_ssl: parameter
is set on each auth block.)
Note that after a successful AUTHINFO, you should not avertise it any
longer and the knowledge from the client is reset (for instance,
any GROUP command issued before is cleared).
>> PRINT "502 Authentication rejected."
>>
>> Not a valid answer. It must be 481 (see RFC 4643).
>
> Ooops, yet another bug!
I assume you followed RFC 2980 :)
Not a big deal, though, 502 instead of 481 because 502 is well understood
by news clients :->
> Argh, now I now that. I was sure that there must be a group selected before
> POST, my fault. So okay, I will always respond to POST with a 340 (unless
> the whole server is read-only), and then I will check what are the
> destination groups...
And also, as Antti-Juhani said, you should have a look at:
http://www.eyrie.org/~eagle/usefor/drafts/draft-ietf-usefor-usepro-14.html#injecting
(Part "3.5. Duties of an Injecting Agent" of RFC 5537, in case the link
is not valid -- in the future.)
>> By the way, there is "dot-stuffing" to handle (maybe you already takes
>> care of that but better warn you):
>
> Yeah, I do know about that, but as far as I understand, I doesn't have to
> care about that (dot-stuffing is done by the sending NewsReader, and
> dot-unstuffing is done by the receiving NewsReader). Am I right?
:)
OK. That's fine.
Nonetheless, do not forget to take it into account when implementing
the ":bytes" part in OVER!
I also assume that Curt will warn you that in case there is a problem
in your news spool/file system, you may end up sending a bad article,
with a mere dot at the beginning of a line, thus breaking the rest
of the article.
See <20090410161411.260$qR@newsreader.com> (Curt Welch):
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
One issue that happens in some servers, is that they send articles from
disk without checking for proper dot protocol. If their disk data gets
corrupted (disk errors/server crash leaving disk data corrupted), they can
sometimes send invalid data - such as a CR LF DOT CR LF in the middle of
the article without realizing it happened. The receiving system then
starts to read some raw article data as if they were commands, and then
starts to do things like send 5xx codes back as errors. When something
like that happens, you don't want the sending server to just start dropping
all the articles from the queue. You want the queue to hang, until the
admin on the sending side fixes his problem. If it takes any of the 5xx
responses to mean reject, then the entire feed could just get flushed or
dropped causing some very large blocks of articles to be lost and making it
very hard to re-feed the lost articles since there is probably no good
documentation on what was lost.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Have a nice week-end,
--
Julien ÉLIE
« Il y a des sciences bonnes dont l'existence est nécessaire
et dont la culture est inutile. Telles sont les mathématiques. » (Joseph Joubert)
Technical Details
Message-ID:
<gvr8b3$hlc$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.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.albasani.net!news.trigofacile.com!not-for-mailReferences:
<3l06f6-ji1.ln1@mail.viste-family.net> <gvpn99$37q$1@news.trigofacile.com> <4kh7f6-g24.ln1@mail.viste-family.net>Show Full Headers
Complete Article Headers
Message-ID: <gvr8b3$hlc$1@news.trigofacile.com> Subject: Re: Have I to issue a GROUP command before POSTing? Date: Sat, 30 May 2009 14:20:44 +0200 From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> References: <3l06f6-ji1.ln1@mail.viste-family.net> <gvpn99$37q$1@news.trigofacile.com> <4kh7f6-g24.ln1@mail.viste-family.net> 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.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.albasani.net!news.trigofacile.com!not-for-mail Newsgroups: news.software.nntp Organization: TrigoFACILE -- http://www.trigofacile.com/ Lines: 232 NNTP-Posting-Host: aaubervilliers-151-1-45-218.w83-114.abo.wanadoo.fr Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=original Content-Transfer-Encoding: 8bit X-Trace: news.trigofacile.com 1243686052 18092 83.114.135.218 (30 May 2009 X-Complaints-To: abuse@trigofacile.com NNTP-Posting-Date: Sat, 30 May 2009 12:20:52 +0000 (UTC) In-Reply-To: <4kh7f6-g24.ln1@mail.viste-family.net> X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6001.18000 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049