🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #89860

Proposal specifications for MAXARTNUM

#89860
From: Julien ÉLIE
Date: Mon, 19 Dec 2022 21:45
780 lines
31931 bytes
Hi all,

I would like to submit you this first draft about MAXARTNUM, as recently 
discussed.
Comments welcome :-)

If some more explanations or examples are needed, or some sentences are 
not clear, or etc., feel free to tell what should be improved.





This document defines an extension to the Network News Transfer Protocol 
(NNTP) that allows implementations to effectively negotiate and make use 
of article numbers greater than the NNTP base specification [RFC3977] 
allows.



Introduction

The NNTP base specification defines the three types of keys used to 
store and index news articles (see Section 6 of [RFC3977]).  Besides the 
Message-ID and arrival timestamp, one of these types of keys is the 
composition of a newsgroup name and an article number within that newsgroup.

For interoperability reasons with existing implementations that do not 
use internal structures and data types capable of handling values 
greater than 2,147,483,647 (that is to say 2^31-1) for article numbers, 
Section 6 of [RFC3977] requires that article numbers lie between 1 and 
2,147,483,647, inclusive.  It implies that a given newsgroup cannot 
contain more than this number of articles.  Nonetheless, some newsgroups 
appear in practice to contain more articles than this limit, which led 
some NNTP implementations not to comply with that rule, and advertise 
article numbers greater than the NNTP standard allows.  It results in 
some compliant news clients experiencing malfunctions upon receiving 
unexpectedly large article numbers in responses to NNTP commands from 
such implementations.

The point of MAXARTNUM as an NNTP extension is to respond to a 
long-standing need for NNTP to standardize a mechanism that will show 
large article numbers only to clients capable of handling them.

The MAXARTNUM command is sent by a news client to indicate the highest 
article number it can cope with.  This is useful when the news server 
supports this extension and carries newsgroups whose reported high water 
mark is 2,147,483,647, or very close to; otherwise, a client does not 
need using this extension with this specific news server as the client 
can already access all the articles the server carries.

Using this extension enables both the client and the server to negotiate 
a mutual maximum article number that can be used during the rest of the 
NNTP session.  Article numbers (including reported high water marks and 
reported low water marks) as well as estimated article counts can then 
exceed 2,147,483,647, up to the mutual maximum article number.

Some server implementations pre-dating this extension are 
unconditionally advertising article numbers greater than 2,147,483,647 
for some newsgroups no matter the client handles them.  Such 
implementations are encouraged to support this extension.

It is RECOMMENDED that server implementations permit configuring the 
maximum article number implicitly set at the start of an NNTP session, 
whose default MUST be 2,147,483,647 when version 2 of NNTP is advertised 
in CAPABILITIES (Section 3.3.2 of [RFC3977]).  The default value MAY be 
different in future versions of NNTP.  This implicit maximum article 
number MAY be global to the news server or configurable at a finer 
level.  For instance, the maximum article number could be implicitly set 
to 18,446,744,073,709,551,615 (2^64-1) for certain users either at the 
start of the NNTP session or after the use of a mechanism identifying 
them (e.g. authentication with AUTHINFO).  Configuring a value greater 
than this default value SHOULD be done only for users known to run a 
news client capable of handling article numbers up to that configured value.

This specification should be read in conjunction with the NNTP base 
specification [RFC3977].  In the case of a conflict between these two 
documents, [RFC3977] takes precedence.



The MAXARTNUM Extension

At the start of an NNTP session, the mutual maximum article number MUST 
be implicitly set to 2,147,483,647, as required for version 2 of NNTP 
(Section 6 of [RFC3977]).  The MAXARTNUM extension is used to increase 
that value, if possible, and explicitly negotiate the highest article 
number that can be used in an NNTP session between a news client and a 
news server.

This extension provides a new MAXARTNUM command and has the capability 
label MAXARTNUM.



Advertising the MAXARTNUM Extension

A server supporting the MAXARTNUM command as defined in this document 
will advertise the "MAXARTNUM" capability label in response to the 
CAPABILITIES command (Section 5.2 of [RFC3977]).  However, this 
capability MUST NOT be advertised once the MAXARTNUM command has 
successfully been executed.

This capability MAY be advertised both before and after any use of the 
MODE READER command (Section 5.3 of [RFC3977]), with the same semantics.

The MAXARTNUM capability MUST NOT be advertised in response to the 
CAPABILITIES command if the MAXARTNUM command cannot be used in the 
current state of the connection (e.g. if authentication is required 
before using it).

The MAXARTNUM capability label is followed by a number.  This number 
indicates the highest article number that the server can handle, which 
corresponds to the maximum number of articles a newsgroup can contain in 
this news server.

This number MUST NOT have leading zeroes, and MUST NOT be lower than 
2,147,483,647 with the exception that a value of 0 (zero) is valid, 
which indicates that the server can handle article numbers of any size.


Example of a server advertising it can handle article numbers up to 2^64-1:

     [C] CAPABILITIES
     [S] 101 Capability list:
     [S] VERSION 2
     [S] MAXARTNUM 18446744073709551615
     [S] READER
     [S] LIST ACTIVE NEWSGROUPS
     [S] .



MAXARTNUM Command

Usage

This command MUST NOT be pipelined.

    Syntax

       MAXARTNUM number

    Responses
       202 number   Mutual maximum article number negotiated
       502          Command unavailable [1]

    [1] If the MAXARTNUM command has already been successfully used, 
MAXARTNUM is no longer a valid command.

    Parameter
       number       Highest article number supported by the client

Description

The MAXARTNUM command instructs the server that it can safely return 
article numbers and estimated article counts up to the proposed number 
during the rest of the NNTP session, instead of limiting these numbers 
to 2,147,483,647 in accordance with version 2 of NNTP.

The client MUST NOT send any further commands until it has seen the 
result of MAXARTNUM as it may affect subsequent answers by the server.

If the MAXARTNUM command does not have exactly one argument, or the 
requested number is syntactically incorrect, or below 2,147,483,647 with 
the exception of 0 (zero), the server MUST reject the MAXARTNUM command 
with a 501 response code ([RFC3977], Section 3.2.1).  Otherwise, in case 
no other generic response code representing the situation applies, the 
server issues a 202 response code followed by the negotiated mutual 
maximum article number.  Although this negotiated number MAY be 
different than the number provided in the MAXARTNUM command, it MUST 
either be 0 (zero), or lie between 2,147,483,647 and the number provided 
in the MAXARTNUM command.

Article numbers and estimated article counts in all NNTP commands and 
responses sent after this 202 response code MAY be beyond 2,147,483,647 
but MUST lie between 1 and the negotiated mutual maximum article number.

Additionally, the client MUST NOT issue a MODE READER command after a 
successful negotiation of the mutual maximum article number with the 
MAXARTNUM command, and a server MUST NOT advertise the MODE-READER 
capability.

A server MUST NOT return the MAXARTNUM capability label in response to a 
CAPABILITIES command received after a successful use of the MAXARTNUM 
command, and a server MUST reply with a 502 response code if a 
syntactically valid MAXARTNUM command is received after an already 
successful use of this command.


Example of a server no longer advertising the MAXARTNUM capability label 
and refusing to negotiate a new mutual maximum article number after a 
successful use of MAXARTNUM:

     [C] CAPABILITIES
     [S] 101 Capability list:
     [S] VERSION 2
     [S] READER
     [S] MAXARTNUM 18446744073709551615
     [S] LIST ACTIVE NEWSGROUPS
     [S] .
     [C] MAXARTNUM 9223372036854775807
     [S] 202 9223372036854775807 is our mutual maximum article number
     [C] CAPABILITIES
     [S] 101 Capability list:
     [S] VERSION 2
     [S] READER
     [S] LIST ACTIVE NEWSGROUPS
     [S] .
     [C] MAXARTNUM 9223372036854775807
     [S] 502 Mutual maximum article number already negotiated
     [C] MAXARTNUM 18446744073709551615
     [S] 502 Mutual maximum article number already negotiated

Example of the negotiation of an unlimited article number size (in the 
limit of the length of an NNTP argument, which is 497 octets):

     [C] CAPABILITIES
     [S] 101 Capability list:
     [S] VERSION 2
     [S] READER
     [S] MAXARTNUM 0
     [S] LIST ACTIVE NEWSGROUPS
     [S] .
     [C] MAXARTNUM 0
     [S] 202 0 No limit in article numbers.  Enjoy!
     [C] GROUP misc.test
     [S] 211 1 1 1234567890123456789012345678901234567890 misc.test
     [C] STAT 1234567890123456789012345678901234567890
     [S] 223 0 <article@example.net> retrieved

Example of syntax errors:

     [C] MAXARTNUM 42
     [S] 501 Article number too low
     [C] MAXARTNUM
     [S] 501 Article number missing
     [C] MAXARTNUM 42 4294967295
     [S] 501 Too many arguments
     [C] MAXARTNUM 4294xx7295
     [S] 501 Not an article number
     [C] MAXARTNUM ^64
     [S] 501 Argument not understood; sorry, Clive!

Example of a mode-switching server no longer advertising the MAXARTNUM 
and MODE-READER capability labels after a successful use of MAXARTNUM:

     [C] CAPABILITIES
     [S] 101 Capability list:
     [S] VERSION 2
     [S] IHAVE
     [S] MODE-READER
     [S] MAXARTNUM 18446744073709551615
     [S] LIST ACTIVE COUNTS
     [S] .
     [C] MAXARTNUM 9223372036854775807
     [S] 202 9223372036854775807 is our mutual maximum article number
     [C] CAPABILITIES
     [S] 101 Capability list:
     [S] VERSION 2
     [S] IHAVE
     [S] LIST ACTIVE COUNTS
     [S] .



How This Extension Affects Implementations

Group Information

The overall behaviour of the reported low water mark and the reported 
high water mark as defined in Section 6.1 of [RFC3977] is not changed by 
this extension, except that the news server MUST NOT return for them a 
value greater than the current mutual maximum article number.  For each 
of these values that is greater than the current mutual maximum article 
number, the news server MUST use the current mutual maximum article 
number in its treatments and responses instead of the real value for 
newsgroups which are not empty.  The estimated number of articles MUST 
then be limited to the range of articles between the returned reported 
low water mark and the returned reported high water mark.

This affects the responses to GROUP, LIST ACTIVE, LIST COUNTS, and 
LISTGROUP commands.

The representation of empty newsgroups described in Section 6.1.1.2 of 
[RFC3977] still applies, within the limitation of the current mutual 
maximum article number which cannot be exceeded.


Example of the preferred way to show an empty newsgroup, with the 
reported high water mark being one less than the reported low water mark:

     [Assumes the mutual maximum article number is 2147483647.]
     [C] LIST ACTIVE
     [S] 215 List of newsgroups follows
     [S] misc.test 2147483646 2147483647 y
     [S] .
     [C] GROUP misc.test
     [S] 211 0 2147483647 2147483646 fr.test
     [C] STAT
     [S] 401 MAXARTNUM



Range Argument

When a range argument is provided to the HDR, LISTGROUP, or OVER 
commands with a dash not followed by another article number, the result 
MUST be limited to all following articles in the newsgroup up to the 
current mutual maximum article number.


Example of the list of article numbers returned by the LISTGROUP command 
before and after the use of MAXARTNUM:

     [C] CAPABILITIES
     [S] 101 Capability list:
     [S] VERSION 2
     [S] READER
     [S] MAXARTNUM 18446744073709551615
     [S] LIST ACTIVE NEWSGROUPS
     [S] .
     [C] LISTGROUP misc.test 2147483645-
     [S] 211 40 2147483600 2147483647 misc.test list follows
     [S] 2147483645
     [S] 2147483646
     [S] 2147483647
     [S] .
     [C] MAXARTNUM 0
     [S] 202 18446744073709551615 is our mutual maximum article number
     [C] LISTGROUP misc.test 2147483645-
     [S] 211 43 2147483600 2147483650 misc.test list follows
     [S] 2147483645
     [S] 2147483646
     [S] 2147483647
     [S] 2147483648
     [S] 2147483649
     [S] 2147483650
     [S] .



Article Retrieval and Selection

The overall behaviour of article retrieval and selection, as well as the 
interaction of NNTP commands with the currently selected newsgroup and 
the current article number as defined in Sections 6.1, 6.2 and 8 of 
[RFC3977], is not changed by this extension, except in the following cases:

o when a news client sends an NNTP command which uses the current 
article number (e.g. third form of ARTICLE, BODY, HDR, HEAD, OVER, STAT, 
and XPAT), and that current article number is valid and greater than the 
current mutual maximum article number,

o when a news client sends an NNTP command with a specified article 
number (e.g. second form of ARTICLE, BODY, HDR, HEAD, OVER, STAT, and 
XPAT) or without (e.g. NEXT) which would alter the current article 
number to another different one, and that new different article number 
exists and is greater than the current mutual maximum article number, 
but lower than the maximum article number the news server can handle 
with the MAXARTNUM capability,

o when a news client sends an NNTP command with a specified range 
compounded of an article number optionally followed by a dash and 
another article number (e.g. LISTGROUP, second form of HDR, OVER, and 
XPAT), and that at least one of the specified article numbers is greater 
than the current mutual maximum article number, but none is greater than 
the maximum article number the news server can handle with the MAXARTNUM 
capability.

If the NNTP command sent by the news client contains an article number, 
individually or in a range, greater than the maximum article number the 
news server can handle with the MAXARTNUM capability, a 501 response 
code MUST be returned.

When one of the above cases happens and the syntax of the NNTP command 
is correct, a 401 response code followed by the MAXARTNUM capability 
label MUST be returned by the news server if this extension has still 
not be successfully used in the NNTP session, and the news server 
supports it in the current state of the connection.

Otherwise, if this extension has already been successfully used, a 502 
response code MUST be returned.  If authentication is possible and 
needed before a possible use of this extension, a 480 response code MUST 
be returned.

In all these cases, the currently selected newsgroup and the current 
article number MUST NOT be altered.


Example of a newsgroup containing only one article number, greater than 
the current mutual maximum article number.  The current article number 
is valid, and set to the one of the article present in the newsgroup 
when using the GROUP command.

     [Assumes the mutual maximum article number is 2147483647.]
     [C] LIST ACTIVE
     [S] 215 List of newsgroups follows
     [S] misc.test 2147483647 2147483647 y
     [S] .
     [C] GROUP misc.test
     [S] 211 0 2147483647 2147483647 fr.test
     [C] STAT
     [S] 401 MAXARTNUM

Example of a newsgroup containing 3 articles whose numbers are 
2147483645, 2147483649, and 4294967300:

     [C] CAPABILITIES
     [S] 101 Capability list:
     [S] VERSION 2
     [S] READER
     [S] MAXARTNUM 18446744073709551615
     [S] LIST ACTIVE NEWSGROUPS
     [S] .
     [C] LIST ACTIVE
     [S] 215 List of newsgroups follows
     [S] misc.test 2147483647 2147483645 y
     [S] .
     [C] GROUP misc.test
     [S] 211 1 2147483645 2147483647 misc.test
     [C] STAT 2147483645
     [S] 223 2147483645 <retrievable.without.maxartnum@example.com>
     [C] STAT 2147483648
     [S] 423 No such article number 2147483648
     [C] NEXT
     [S] 401 MAXARTNUM
     [C] MAXARTNUM 4294967295
     [S] 202 4294967295 is our mutual maximum article number
     [C] NEXT
     [S] 223 2147483649 <retrievable.after.maxartnum@example.com>
     [C] NEXT
     [S] 502 Greater than our mutual maximum article number

Note that the STAT command for article number 2147483648 returned a 423 
response code, and not a 401 or 501 response code.

Example of other NNTP commands which return 401 with the same example of 
newsgroup containing 3 articles as above:

     [C] CAPABILITIES
     [S] 101 Capability list:
     [S] VERSION 2
     [S] READER
     [S] MAXARTNUM 18446744073709551615
     [S] LIST ACTIVE NEWSGROUPS
     [S] .
     [C] GROUP misc.test
     [S] 211 1 2147483645 2147483647 misc.test
     [C] STAT 2147483649
     [S] 401 MAXARTNUM
     [C] OVER 2147483646-2147483648
     [S] 401 MAXARTNUM
     [C] OVER 2147483646-2147483649
     [S] 401 MAXARTNUM
     [C] OVER 2147483648-
     [S] 401 MAXARTNUM



Article Posting

The overall behaviour of article posting, as defined in Section 6.3 of 
[RFC3977] is not changed by this extension, except when the POST command 
is used and the highest article number of at least one of the newsgroups 
the article is posted to is equal or greater than the current mutual 
maximum article number.  This case applies to injecting agents which are 
also acting as serving agents, and therefore maintain a list of article 
numbers in newsgroups.  It aims at preventing a news user from sending 
several times the same article in a newsgroup, thinking the posting was 
not done because he does not see the article in the newsgroup (whereas 
in fact the news reading software he is using does not cope with article 
numbers greater than the mutual maximum article number; without this 
exception, the article would have successfully been posted and not made 
available to the original poster, but only to users running news 
software capable of handling greater article numbers).

When this case happens, the article SHOULD neither be made available on 
the news server nor transferred to other news servers.  A 401 response 
code followed by the MAXARTNUM capability label SHOULD be returned by 
the news server as the subsequent response to POST, if this extension 
has still not be successfully used in the NNTP session, and the news 
server supports it in the current state of the connection.  Otherwise, 
if this extension has already been successfully used, a 502 response 
code SHOULD be returned.  If authentication is possible and needed 
before a possible use of this extension, a 480 response code SHOULD be 
returned.

NOTE: Article transfer between news servers with IHAVE or TAKETHIS is 
not changed by this extension.  Relaying agents SHOULD go on relaying 
successfully injected messages even though they cannot store or index 
them locally.  In case the transfer of an article fails because the 
relaying agent maintains a list of article numbers and the highest 
article number in a newsgroup has reached the maximum article number it 
can handle, this failure MUST be considered permanent so that the 
article is not reproposed again and again.  It notably means that the 
436 response code MUST NOT be returned by IHAVE, nor the 400 response 
code by TAKETHIS.  These commands MUST either explicitly accept or 
reject the article.



Behaviour After 401 Response Code

When a 401 response code followed by the MAXARTNUM capability label is 
returned, the news client SHOULD use the MAXARTNUM command described in 
this document to negotiate a greater mutual maximum article number. 
After a successful negotiation, the news client MAY send again the 
command for which it previously received a 401 response code.



Handling the Xref Header Field

The Xref header field that can be present in the article headers or 
overview data traditionally contains article numbers (as 
<article-locator> in Section 3.2.14 of [RFC5536]).  Implementations 
which use the traditional form required by [RFC3977] SHOULD set 
<article-locator> to 0 (zero) in case <article-locator> would otherwise 
be greater than the current maximum article number.  This recommendation 
is done in conformance with Section 6 of [RFC3977] which already allows 
the value 0 (zero) in the NNTP protocol to replace an article number in 
some special situation.

It means that when a news client uses the ARTICLE, HDR, HEAD, OVER, or 
XPAT commands, a compliant news server SHOULD ensure that no article 
numbers beyond the current maximum article number are present in Xref 
header fields.  To achieve that, the news server acting as a serving 
agent (Section 3.7 of [RFC5537]) MAY alter or delete such Xref header 
fields.  In all cases, it MUST ensure overview data remains coherent, 
especially the value of the :bytes metadata item (Section 8.1.1 of 
[RFC3977]).

NOTE: The Xref header field of crossposted articles can end up 
containing both newsgroups with <article-locator> set to 0 (zero) and 
newsgroups with <article-locator> set to real article numbers.


Example of the use of NEWNEWS to retrieve articles without using the 
MAXARTNUM extension, although their article numbers are greater than the 
mutual maximum article number.  The misc.test newsgroup contains 100 
article numbers, from 3000000000 to 3000000100.  The Xref header field 
is altered in the ARTICLE multi-line response block.

     [C] CAPABILITIES
     [S] 101 Capability list:
     [S] VERSION 2
     [S] READER
     [S] MAXARTNUM 18446744073709551615
     [S] LIST ACTIVE NEWSGROUPS
     [S] NEWNEWS
     [S] .
     [C] LIST ACTIVE
     [S] 215 List of newsgroups follows
     [S] misc.test 2147483647 2147483647 y
     [S] .
     [C] NEWNEWS misc.test 20221225 090000
     [S] 230 New news follows
     [S] <article.3000000098@example.com>
     [S] <article.3000000099@example.com>
     [S] <article.3000000100@example.com>
     [S] .
     [C] ARTICLE <article.3000000098@example.com>
     [S] 220 0 <article.3000000098@example.com>
     [S] Path: example!not-for-mail
     [S] From: "Demo User" <nobody@example.com>
     [S] Newsgroups: misc.test
     [S] Subject: A test
     [S] Date: Sun, 25 Dec 2022 09:12:00 -0000 (UTC)
     [S] Message-ID: <article.3000000098@example.com>
     [S] Xref: example misc.test:0
     [S]
     [S] This is just a test article.
     [S] .

Since the last run of NEWNEWS by the client, 3 new articles have arrived 
in the misc.test newsgroup.  The news client retrieves them by 
Message-ID, like in the above example for article number 3000000098.



Leading Zeroes and Size of Article Numbers

Section 6 of [RFC3977] allows the use of leading zeroes in article 
numbers as long as they do not result in numbers of more than 16 digits.

This extension changes that requirement.  When the MAXARTNUM capability 
is advertised in response to CAPABILITIES, article numbers sent by a 
compliant implementation MUST NOT use more than 6 digits besides the 
number of digits the number following this capability label has, with 
the exception of when the number is zero (0), in which case 497 digits 
are allowed (corresponding to the maximum length of an NNTP argument, as 
defined in Section 3.1 of [RFC3977]).

When the MAXARTNUM command has been successfully used, article numbers 
sent by a compliant implementation MUST NOT use more than 6 digits 
besides the number of digits the negotiated mutual maximum article 
number has.  (This is coherent with the fact that 2,147,483,647 has 10 
digits, and the limit of 16 digits in [RFC3977].)

Example of the change with this extension:

     [C] CAPABILITIES
     [S] 101 Capability list:
     [S] VERSION 2
     [S] READER
     [S] MAXARTNUM 18446744073709551615
     [S] LIST ACTIVE NEWSGROUPS
     [S] .
     [C] LIST ACTIVE
     [S] 215 List of newsgroups follows
     [S] misc.test 2147483647 0000000001 y
     [S] .
     [C] MAXARTNUM 18446744073709551615
     [S] 202 18446744073709551615 is our mutual maximum article number
     [C] LIST ACTIVE
     [S] 215 List of newsgroups follows
     [S] misc.test 00446744073709551615 00000000000000000001 y
     [S] .
     [C] GROUP misc.test
     [S] 211 4846845515592 1 446744073709551615 misc.test
     [C] STAT 00000000000000000001
     [S] 223 1 <first.article@example.net> retrieved
     [C] STAT 000000000000000000000000001
     [S] 501 Too many digits in article number



Augmented BNF Syntax for the MAXARTNUM Extension

This section describes the formal syntax of the MAXARTNUM extension 
using ABNF [RFC7405] and [RFC5234].  It extends the syntax in Section 9 
of [RFC3977], and non-terminals not defined in this document are defined 
there.  The NNTP ABNF [RFC3977] should be imported first, before 
attempting to validate these rules.

Commands

This syntax extends the non-terminal <command>, which represents an NNTP 
command.

     command =/ maxartnum-command
     maxartnum-command = "MAXARTNUM" WS article-number


Capability Entries

This syntax extends the non-terminal <capability-entry>, which 
represents a capability that may be advertised by the server.

     capability-entry =/ maxartnum-capability
     maxartnum-capability = "MAXARTNUM" WS article-number


General Non-terminals

As the definition of <article-number> in Section 9.8 of [RFC3977] allows 
only 16 digits, compliant implementations of the MAXARTNUM extension 
MUST be prepared to parse larger numbers of at least the maximum length 
of an NNTP argument (497 octets, as defined in Section 3.1 of 
[RFC3977]).  Such large numbers MAY indeed be provided as the argument 
of the MAXARTNUM capability or command.  These numbers MUST NOT be 
considered as a syntax error.

Therefore, implementations of this extension accept the additional syntax:

      article-number =/ 1*497DIGIT


Summary of Response Codes

This section defines the following new response code.  It is not 
multi-line and has one argument.

     Response code 202
       Generated by: MAXARTNUM
       1 argument: article-number
       Meaning: mutual maximum number negotiated


Responses

This syntax extends the non-terminal <initial-response-content>, which 
represents an initial response line sent by the news server.

     initial-response-content =/ response-202-content
     response-202-content = "202" SP article-number

NOTE: The 202 response code, once used by the SLAVE command, was removed 
from the NNTP protocol by [RFC3977] (see Appendix D).  The MAXARTNUM can 
safely re-use that response code as there is no possibility of confusion.



Internationalization Considerations

No new internationalization considerations are introduced by this 
extension, beyond those already described in the core specification 
[RFC3977].



Security Considerations

No new security considerations are introduced by this extension, beyond 
those already described in the core specification [RFC3977].

It may even make compliant implementations more robust in how they deal 
with article numbers as a careful bounds checking will ensure they are 
not affected by integer overflow.



IANA Considerations

This section gives a formal definition of this extension as required by 
Section 3.3.3 of [RFC3977] for the IANA registry.

o The MAXARTNUM extension allows NNTP implementations to effectively 
negotiate and make use of article numbers greater than the limit of 
2,147,483,647 required by [RFC3977].

o The capability label for this extension is "MAXARTNUM", whose argument 
is the highest article number the news server can handle.  A value of 0 
(zero) indicates that the news server can handle article numbers of any 
size.

o This extension defines one new command, MAXARTNUM, whose behaviour, 
arguments, and responses are defined in this document.

o This extension does not associate any new responses with pre-existing 
NNTP commands.

o This extension does not cause any pre-existing NNTP command to produce 
a 483 response.  However, in some circumstances described in this 
document, 401 and 480 response codes may be returned by ARTICLE, BODY, 
HDR, HEAD, LISTGROUP, NEXT, OVER, STAT, and XPAT (Section 2.9 of 2980).

o This extension does not affect the maximum length of NNTP commands or 
initial response lines.

o This extension does not alter pipelining, but the MAXARTNUM command 
cannot be pipelined.

o Use of this extension does alter the capabilities list; once the 
MAXARTNUM command has been used successfully, the MAXARTNUM capability 
can no longer be advertised by CAPABILITIES.  Additionally, the 
MODE-READER capability MUST NOT be advertised after a successful 
execution of the MAXARTNUM command.

o This extension is unaffected by any use of the MODE READER command; 
however, the MODE READER command MUST NOT be used in the same session 
following a successful execution of the MAXARTNUM command.

o This extension does not affect the overall behaviour of a server or 
client other than via the new MAXARTNUM command and the adjustments to 
existing NNTP commands and responses to handle how article numbers are 
shown before and after a successful execution of the MAXARTNUM command.



Acknowledgements

The author gratefully acknowledges the comments and additional 
information provided by Russ Allbery, Michael Bäuerle, Urs Janßen, 
Richard Kettlewell, and Olivier Miakinen on preliminary discussions 
which led to this document.

Special thanks are due to Clive Feather, whose ideas served as the 
initial basis for the MAXARTNUM command, and Franck Rayssiguier for his 
valuable feedback on this document while concretely implementing it in a 
news server handling 64-bit article numbers.



-- 
Julien ÉLIE

« J'ai un copain, il est pilote d'essai… Enfin, il ne l'est pas encore ;
   pour l'instant, il essaie d'être pilote ! » (Raymond Devos)
Technical Details
Message-ID: <tnqm14$35bas$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <tnqm14$35bas$1@news.trigofacile.com>
Subject: Proposal specifications for MAXARTNUM
Date: Mon, 19 Dec 2022 22:45:08 +0100
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Newsgroups: news.software.nntp
Organization: Groupes francophones par TrigoFACILE
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 19 Dec 2022 21:45:08 -0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="san13-h02-176-143-2-105.dsl.sta.abo.bbox.fr:176.143.2.105";
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
 Gecko/20100101 Thunderbird/102.6.0
Cancel-Lock: sha1:4P983cjpn6Vdg1zKRiOLV08hcBQ= sha256:FIeZ8i9UaijIJZ2J0aLRE0thD/qf+fCUNduSPtnWb0E=
Lines: 779