Independent Submission J. Elie Internet-Draft January 8, 2010 Updates: 2980, 3977 (if approved) Intended status: Standards Track Expires: July 12, 2010 Network News Transfer Protocol (NNTP) Additions to LIST Command draft-elie-nntp-list-additions-01 Abstract This document defines a set of enhancements to the Network News Transfer Protocol (NNTP) that allows a client to request extended information maintained by NNTP servers as for local use and distribution policy. These enhancements are made as new keywords to the existing LIST capability described in RFC 3977. This memo updates and formalizes the LIST DISTRIBUTIONS and LIST SUBSCRIPTIONS commands defined in RFC 2980. It also adds the LIST COUNTS, LIST MODERATORS and LIST MOTD commands, and specifies additional values returned by the existing LIST ACTIVE command for the status of a newsgroup. Status of This Memo This Internet-Draft is submitted to IETF in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire on July 12, 2010. Elie Expires July 12, 2010 [Page 1] Internet-Draft NNTP Additions to LIST Command January 2010 Copyright Notice Copyright (c) 2010 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the BSD License. This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English. Elie Expires July 12, 2010 [Page 2] Internet-Draft NNTP Additions to LIST Command January 2010 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.1. Conventions Used in This Document . . . . . . . . . . . . 5 2. New LIST Variants . . . . . . . . . . . . . . . . . . . . . . 5 2.1. Advertising the New LIST Variants . . . . . . . . . . . . 5 2.2. LIST COUNTS . . . . . . . . . . . . . . . . . . . . . . . 6 2.2.1. Usage . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2.2. Description . . . . . . . . . . . . . . . . . . . . . 7 2.2.3. Examples . . . . . . . . . . . . . . . . . . . . . . . 8 2.3. LIST DISTRIBUTIONS . . . . . . . . . . . . . . . . . . . . 8 2.3.1. Usage . . . . . . . . . . . . . . . . . . . . . . . . 9 2.3.2. Description . . . . . . . . . . . . . . . . . . . . . 9 2.3.3. Example . . . . . . . . . . . . . . . . . . . . . . . 10 2.4. LIST MODERATORS . . . . . . . . . . . . . . . . . . . . . 10 2.4.1. Usage . . . . . . . . . . . . . . . . . . . . . . . . 10 2.4.2. Description . . . . . . . . . . . . . . . . . . . . . 10 2.4.3. Example . . . . . . . . . . . . . . . . . . . . . . . 11 2.5. LIST MOTD . . . . . . . . . . . . . . . . . . . . . . . . 12 2.5.1. Usage . . . . . . . . . . . . . . . . . . . . . . . . 12 2.5.2. Description . . . . . . . . . . . . . . . . . . . . . 13 2.5.3. Example . . . . . . . . . . . . . . . . . . . . . . . 13 2.6. LIST SUBSCRIPTIONS . . . . . . . . . . . . . . . . . . . . 14 2.6.1. Usage . . . . . . . . . . . . . . . . . . . . . . . . 14 2.6.2. Description . . . . . . . . . . . . . . . . . . . . . 14 2.6.3. Examples . . . . . . . . . . . . . . . . . . . . . . . 15 3. Additions to LIST ACTIVE . . . . . . . . . . . . . . . . . . . 16 3.1. New status fields . . . . . . . . . . . . . . . . . . . . 16 3.2. Examples . . . . . . . . . . . . . . . . . . . . . . . . . 19 4. Augmented BNF Syntax for These Additions to the LIST Command . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.1. Commands . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.2. Responses . . . . . . . . . . . . . . . . . . . . . . . . 21 5. Internationalisation Considerations . . . . . . . . . . . . . 22 6. Security Considerations . . . . . . . . . . . . . . . . . . . 22 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 23 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 24 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 24 9.1. Normative References . . . . . . . . . . . . . . . . . . . 24 9.2. Informative References . . . . . . . . . . . . . . . . . . 24 Appendix A. Document History (to be removed by RFC Editor before publication) . . . . . . . . . . . . . . . . 25 Appendix A.1. Changes from -00 . . . . . . . . . . . . . . . . . . 25 Elie Expires July 12, 2010 [Page 3] Internet-Draft NNTP Additions to LIST Command January 2010 1. Introduction The NNTP specification [RFC3977] defines the LIST capability and a few keywords which can be used with that command: ACTIVE, ACTIVE.TIMES, DISTRIB.PATS, HEADERS, NEWSGROUPS, and OVERVIEW.FMT. As other widely used variants of the LIST command currently exist, they are formalized in this document. The DISTRIBUTIONS and SUBSCRIPTIONS variants have originally been documented in [RFC2980]. The LIST DISTRIBUTIONS command is sent by a news client to obtain a list of relevant distributions known by a news server along with their descriptions. The LIST SUBSCRIPTIONS command is sent by a news client when first connecting to a news server so as to obtain a list of recommended newsgroups available on it. Both of these commands are intended to be used in place of hard- coding news clients to use specific distributions or look for specific default newsgroups. The MOTD variant has originally been documented in [I-D.draft-hernacki-nntplist] (which also defines the SUBSCRIPTIONS variant). The LIST MOTD command is sent by a news client to obtain a "message of the day" containing useful information regarding the current state of a news server. The COUNTS and MODERATORS variants have not been documented before. The LIST COUNTS command is the same as LIST ACTIVE, except that it also returns an estimated number of articles in every newsgroup. The LIST MODERATORS command is sent by a news client to obtain a list of associations between a moderated newsgroup and its submission address. The ACTIVE variant has already been documented in [RFC3977] but the meaning of only three status fields in response to the LIST ACTIVE command has been specified: "y", "n", and "m". These status are particularly useful for readers since they describe local posting rights. This memo defines five other values for the status field: "Y", "M", "x", "j", and "=" followed by the name of a newsgroup. These new status are particularly useful for peers since they mainly describe how remote articles coming from peers are locally handled by the news server. This specification is to be read in conjunction with the NNTP base specification [RFC3977]. Except where specifically stated otherwise, in the case of a conflict between these two documents, [RFC3977] takes precedence over this one. Elie Expires July 12, 2010 [Page 4] Internet-Draft NNTP Additions to LIST Command January 2010 1.1. Conventions Used in This Document The notational conventions used in this document are the same as those in [RFC3977], and any term not defined in this document has the same meaning as it does in that one. The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY" in this document are to be interpreted as described in [RFC2119]. When a hexadecimal correspondence is given to an octet in this document, the value is in US-ASCII [ASCII] (for instance ".", noted %x2E). In the examples, commands from the client are indicated with [C], and responses from the server are indicated with [S]. The client is the initiator of the NNTP connection; the server is the other endpoint. 2. New LIST Variants The LIST capability is defined in Section 7.6 of [RFC3977]. It allows the server to provide blocks of useful information to the client. This document provides five new keywords to the LIST capability: COUNTS, DISTRIBUTIONS, MODERATORS, MOTD, and SUBSCRIPTIONS. All these keywords are optional and correspond to an eponymous variant of the LIST command. 2.1. Advertising the New LIST Variants When a news server implements a variant of the LIST command as described in this specification, it advertises the corresponding feature in the LIST capability. Where one of these new LIST keywords is advertised, it MUST have the meaning given in this specification. For instance, if a news server implements the SUBSCRIPTIONS variant, it will add the SUBSCRIPTIONS keyword to the LIST capability in response to the CAPABILITIES command (see Section 5.2 of [RFC3977]): Elie Expires July 12, 2010 [Page 5] Internet-Draft NNTP Additions to LIST Command January 2010 [C] CAPABILITIES [S] 101 Capability list: [S] VERSION 2 [S] READER [S] LIST ACTIVE NEWSGROUPS SUBSCRIPTIONS [S] . [C] LIST SUBSCRIPTIONS [S] 215 List of recommended newsgroups follows [S] local.welcome [S] local.test [S] news.newusers.questions [S] news.announce.newusers [S] . For all the new LIST variants described in this specification, an empty response can be sent to the client: [C] LIST SUBSCRIPTIONS [S] 215 List of recommended newsgroups follows [S] . It means that the information is maintained by the news server but that it is voluntarily empty. As often as not, the news server maintains the information in a configuration file. This file can be empty or contain only commented or blank lines, which leads to a voluntary absence of information. When the news server does not maintain the information (for instance when the configuration file does not exist), the 503 response code MUST be returned: [C] LIST SUBSCRIPTIONS [S] 503 No list of recommended newsgroups available 2.2. LIST COUNTS 2.2.1. Usage Syntax LIST COUNTS [wildmat] Responses 215 List of newsgroups follows (multi-line) Parameters wildmat Groups of interest Elie Expires July 12, 2010 [Page 6] Internet-Draft NNTP Additions to LIST Command January 2010 2.2.2. Description See Section 7.6.1 of [RFC3977] for general requirements of the LIST command. The counts list returns a list of valid newsgroups carried by the news server along with associated information. The information is returned as a multi-line data block following the 215 response code and contains one line per newsgroup. Each line of this list MUST consist of five fields separated from each other by one or more spaces (the usual practice is a single space) in the following order: o The name of the newsgroup. o The reported high water mark for the group. o The reported low water mark for the group. o The estimated number of articles in the group. o The current status of the group on this server. The reported high and low water marks, and the estimated number of articles are as described in the GROUP command (see Section 6.1.1 of [RFC3977]), but note that they are in the opposite order to the 211 response to that command. The current status of the group is as described in the LIST ACTIVE command (see Section 7.6.3 of [RFC3977], as well as Section 2.2 of this document). The order of newsgroups in the list is not significant. The same newsgroup SHOULD NOT appear twice in the output of this command. The counts list is newsgroup-based, and a wildmat MAY be specified, in which case the response is limited to only the groups, if any, whose names match the wildmat. If no wildmat is specified, the server MUST include every newsgroup that the client is permitted to select with the GROUP command (see Section 6.1.1 of [RFC3977]). The counts list MAY be empty. If the server does not maintain the information, a 503 response code MUST be returned. (However, note that a news server that supports this command usually maintains the information.) The client MAY use LIST COUNTS in order to obtain an estimate of the Elie Expires July 12, 2010 [Page 7] Internet-Draft NNTP Additions to LIST Command January 2010 number of articles in every newsgroup the server carries, which enables it to provide the end user with this information. Instead of using LIST ACTIVE and separate GROUP commands to get the estimated number of articles in newsgroups, the client may therefore use LIST COUNTS. 2.2.3. Examples Example of output with no argument: [C] CAPABILITIES [S] 101 Capability list: [S] VERSION 2 [S] READER [S] LIST ACTIVE COUNTS NEWSGROUPS [S] . [C] LIST COUNTS [S] 215 List of newsgroups follows [S] misc.test 3002322 3000234 1234 y [S] comp.risks 442001 441099 742 m [S] local.empty 7 8 0 Y [S] . Example of output with a wildmat: [C] LIST COUNTS comp.*,misc.* [S] 215 List of newsgroups follows [S] misc.test 3002322 3000234 1234 y [S] comp.risks 442001 441099 742 m [S] . Example of output on an implementation that includes leading zeroes: [C] LIST COUNTS [S] 215 List of newsgroups follows [S] misc.test 0003002322 0003000234 1234 y [S] comp.risks 0000442001 0000441099 742 m [S] local.empty 0000000007 0000000008 0 Y [S] . The estimated number of articles usually does not start with leading zeroes, but MAY have them. 2.3. LIST DISTRIBUTIONS Elie Expires July 12, 2010 [Page 8] Internet-Draft NNTP Additions to LIST Command January 2010 2.3.1. Usage Syntax LIST DISTRIBUTIONS Responses 215 Distributions list follows (multi-line) 2.3.2. Description See Section 7.6.1 of [RFC3977] for general requirements of the LIST command. The distributions list is maintained by some NNTP servers to contain the name of each distribution that is known by the news server and a short description about the meaning of the distribution. The information is returned as a multi-line data block following the 215 response code and contains one line per distribution. Each line of this list MUST consist of two fields separated from each other by one or more space or TAB characters (the usual practice is a single TAB). The first field is the name of the distribution, and the second field is a short description of the distribution. There are no leading or trailing whitespaces in a line. The description MAY contain whitespaces. The order of distributions in the list is not significant; the server need not even consistently return the same order or the same results if this command is used more than once in a session. The same distribution SHOULD NOT appear twice in the output of this command. The description MUST be in UTF-8. The distributions list is not newsgroup-based, and an argument MUST NOT be specified. Otherwise, a 501 response code MUST be returned. The distributions list MAY be empty. If the server does not maintain the information, a 503 response code MUST be returned. The client MAY use this information to provide the user with a list of known distributions he can use. If the news server implements the LIST DISTRIBUTIONS command, it SHOULD also implement the LIST DISTRIB.PATS command and describe in the distributions list at least all the distributions present in the distrib.pats list so that the client can use both of these commands jointly. The distrib.pats list is defined in Section 7.6.5 of [RFC3977]; it assists clients to Elie Expires July 12, 2010 [Page 9] Internet-Draft NNTP Additions to LIST Command January 2010 choose a value for the content of the Distribution header of a news article being posted (see Section 3.2.4 of [RFC5536] for the definition of this header). 2.3.3. Example Example of a joint use of LIST DISTRIB.PATS and LIST DISTRIBUTIONS: [C] CAPABILITIES [S] 101 Capability list: [S] VERSION 2 [S] READER [S] LIST ACTIVE DISTRIB.PATS DISTRIBUTIONS NEWSGROUPS [S] . [C] LIST DISTRIB.PATS [S] 215 Information follows [S] 10:local.*:local [S] 5:france.*:fr [S] 20:local.here.*:thissite [S] . [C] LIST DISTRIBUTIONS [S] 215 List of distributions follows [S] fr Local to France. [S] local Local to this news server. [S] thissite Local to this site. [S] . 2.4. LIST MODERATORS 2.4.1. Usage Syntax LIST MODERATORS Responses 215 Moderators list follows (multi-line) 2.4.2. Description See Section 7.6.1 of [RFC3977] for general requirements of the LIST command. The moderators list is maintained by some NNTP servers to make clients aware of the submission address the news server will use when an article is locally posted to a moderated newsgroup. The information is returned as a multi-line data block following the 215 response code. Each line of this list MUST consist of two fields Elie Expires July 12, 2010 [Page 10] Internet-Draft NNTP Additions to LIST Command January 2010 separated from each other by a colon (":" or %x3A). The first field is a wildmat (which may be a simple newsgroup name), and the second field is the submission address for newsgroups matching that wildmat. There are no leading or trailing whitespaces in a line. The submission address MAY contain colons (":"). The order of lines in the list is significant: the first matching line is used. Consequently, specific patterns should be listed before general patterns. Every moderated newsgroup name SHOULD be matched by at least one line in the list. When an unapproved article is locally posted to a moderated newsgroup, it is forwarded to a moderator (see Section 3.5.1 of [RFC5537]), using the submission address for that newsgroup. This submission address is the second field of the first matching line in the moderators list. It is an e-mail address with one exception: at most one occurrence of the case-sensitive string "%s" (%x25.73) may occur anywhere in the address. If present, the news server will replace it, when forwarding the article to the moderator, with the name of the matching newsgroup, with all periods ("." or %x2E) in the name changed to dashes ("-" or %x2D). If there is a literal "%" in the submission address, it MUST be written as "%%", even if not followed by an "s". NOTE: How submission addresses are created and maintained is outside the scope of this specification. The moderators list is not newsgroup-based, and an argument MUST NOT be specified. Otherwise, a 501 response code MUST be returned. The moderators list MAY be empty. If the server does not maintain the information, a 503 response code MUST be returned, though these two cases SHOULD NOT occur if the news server is an injecting agent that carries moderated newsgroups. 2.4.3. Example Example of output: Elie Expires July 12, 2010 [Page 11] Internet-Draft NNTP Additions to LIST Command January 2010 [C] CAPABILITIES [S] 101 Capability list: [S] VERSION 2 [S] READER [S] POST [S] LIST ACTIVE MODERATORS NEWSGROUPS [S] . [C] LIST MODERATORS [S] 215 List of submission addresses follows [S] foo.bar:announce@example.com [S] local.*:%s@localhost [S] *:%s@moderators.example.com [S] . The following table describes a few examples of associations between a moderated newsgroup and its submission address on a news server whose moderators list is the one of the previous example: +-----------------------------+-------------------------------------+ | Name of the moderated | Submission address | | newsgroup | | +-----------------------------+-------------------------------------+ | foo.bar | announce@example.com | | local.test | local-test@localhost | | alt.dev.null | alt-dev-null@moderators.example.com | | alt.test-me | alt-test-me@moderators.example.com | +-----------------------------+-------------------------------------+ NOTE: When "%s" is used, periods are changed to dashes, and dashes are left alone. It implies that two moderated newsgroups whose names differ only by changing a period to a dash would go to the same address. Therefore, if such moderated newsgroup pairs exist with different submission addresses, a "%s" pattern rule cannot be used for the moderation submission addresses for those groups, and explicit entries without a pattern will be required. Similarly, a "%s" pattern rule cannot be used for the moderation submission address for two moderated newsgroups whose names differ only by the case of their characters. See also Section 3.1.4 of [RFC5536] and Section 7.2 of [I-D.ietf-usefor-useage] for the syntax of a newsgroup name. 2.5. LIST MOTD 2.5.1. Usage Elie Expires July 12, 2010 [Page 12] Internet-Draft NNTP Additions to LIST Command January 2010 Syntax LIST MOTD Responses 215 Information follows (multi-line) 2.5.2. Description See Section 7.6.1 of [RFC3977] for general requirements of the LIST command. The motd list contains a "message of the day" relevant to the news server. It is intended to provide notification and communication between the news administrator and the news user. For instance, notification of upcoming downtime or information about new facilities available on the news server can be advertised via this means of communication. The information is returned as a multi-line data block following the 215 response code. This text is not guaranteed to be in any particular format although, like all multi-line data blocks, it is "dot-stuffed". The server need not return the same information if this command is used more than once in a session. It MAY indeed send a different message of the day depending on the state of the session. For instance, on a mode-switching news server, the information can be different between its transit mode and its reader mode, or between an authenticated session and an unauthenticated session. The information MUST be in UTF-8. The motd list is not newsgroup-based, and an argument MUST NOT be specified. Otherwise, a 501 response code MUST be returned. The motd list MAY be empty. If the server does not maintain the information, a 503 response code MUST be returned. It is up to the client to decide when and how to display this message to the user. No timestamp or date of last modification date is provided. The client may want to keep some state if it wishes to show the message only upon modification. 2.5.3. Example Example of output: Elie Expires July 12, 2010 [Page 13] Internet-Draft NNTP Additions to LIST Command January 2010 [C] CAPABILITIES [S] 101 Capability list: [S] VERSION 2 [S] READER [S] LIST ACTIVE MOTD NEWSGROUPS [S] . [C] LIST MOTD [S] 215 Message of the day follows [S] Attention all users, [S] [S] This server will be down for scheduled upgrades on February, 1st. [S] It should be back up by 8:00 a.m. February, 2nd. [S] Any questions should be e-mailed to . [S] [S] Apologies for the disturbance. [S] . 2.6. LIST SUBSCRIPTIONS 2.6.1. Usage Syntax LIST SUBSCRIPTIONS [wildmat] Responses 215 Subscriptions list follows (multi-line) Parameters wildmat Groups of interest 2.6.2. Description See Section 7.6.1 of [RFC3977] for general requirements of the LIST command. The subscriptions list is maintained by some NNTP servers to provide the client with a list of recommended newsgroups. The information is returned as a multi-line data block following the 215 response code. Each line of this list MUST consist of a newsgroup name. There are no leading or trailing whitespaces in a line. The order of newsgroups in the list is significant: they are listed by order of importance, the first newsgroup being the most important to subscribe to. The same newsgroup name SHOULD NOT appear twice in the output of this Elie Expires July 12, 2010 [Page 14] Internet-Draft NNTP Additions to LIST Command January 2010 command. The list SHOULD contain only newsgroups the news server carries. The subscriptions list is newsgroup-based, and a wildmat MAY be specified, in which case the response is limited to only the groups, if any, whose names match the wildmat. Note that the wildmat argument is a new feature in this specification and servers that do not support CAPABILITIES or do not advertise the SUBSCRIPTIONS keyword in the LIST capability (and therefore do not conform to this specification) are unlikely to support it. The subscriptions list MAY be empty. If the server does not maintain the information, a 503 response code MUST be returned. The client MAY use this information the first time it connects to the news server so as to initialize the list of default subscribed newsgroups. This list should therefore contain groups intended for new users on the news server or Usenet in general. For instance newsgroups dedicated to testing, support, announcement, or FAQs. The client MAY present the groups in the order of appearance in the list to the user. When the subscriptions list is maintained and non empty, the news client SHOULD use it, instead of a hard-coded default list, if any. 2.6.3. Examples Example of output with no argument: [C] CAPABILITIES [S] 101 Capability list: [S] VERSION 2 [S] READER [S] LIST ACTIVE NEWSGROUPS SUBSCRIPTIONS [S] . [C] LIST SUBSCRIPTIONS [S] 215 List of recommended newsgroups follows [S] local.welcome [S] local.test [S] news.newusers.questions [S] news.announce.newusers [S] . Example of output with a wildmat: [C] LIST SUBSCRIPTIONS local.* [S] 215 List of recommended newsgroups follows [S] local.welcome [S] local.test Elie Expires July 12, 2010 [Page 15] Internet-Draft NNTP Additions to LIST Command January 2010 [S] . 3. Additions to LIST ACTIVE This document specifies five new status fields that can be used in the answers to LIST ACTIVE: "Y", "M", "x", "j", and "=" followed by the name of a newsgroup. 3.1. New status fields The LIST ACTIVE command is defined in Section 7.6.3 of [RFC3977]. The fourth field of each line of this list indicates the current status of the newsgroup whose name is specified in the first field. Three status are defined in [RFC3977]: "y" Posting is permitted. "n" Posting is not permitted. "m" Postings will be forwarded to the newsgroup moderator. This document defines five other case-sensitive status which can also be used: "Y" Only local posting is permitted. "M" Only local posting is permitted and will be forwarded to the newsgroup moderator. "x" Postings and articles from peers are not permitted. "j" Only articles from peers are permitted but no articles are locally filed. "=other.group" Only articles from peers are permitted, and are filed under the newsgroup named "other.group". The server SHOULD use these values when these meanings are required and MUST NOT use them with any other meaning. A newsgroup with status "Y" is a newsgroup with status "y" wherein articles from peers are not accepted. Similarly, a newsgroup with status "M" is a newsgroup with status "m" wherein articles from peers are not accepted. The fact that a newsgroup has a "Y" or an "M" status does not necessarily imply that the articles posted to it cannot be propagated to other news servers. The difference between a newsgroup with status "n" and a newsgroup Elie Expires July 12, 2010 [Page 16] Internet-Draft NNTP Additions to LIST Command January 2010 with status "x" is that articles from peers are accepted for the former, and rejected for the latter. A newsgroup with status "x" is considered as closed: no new articles will arrive in such a group. On the contrary, articles from peers will arrive in a newsgroup with status "n". Local postings are not allowed in a newsgroup with one of these two status. The differences between a newsgroup with status "y" and a newsgroup with status "j" are that articles are filed into the corresponding newsgroup for the former, and not locally filed for the latter; besides, local postings are accepted for the former, and rejected for the latter. If an article is received from a peer in a newsgroup with status "j", and in case it is not crossposted to some other valid groups, it will not be filed into a newsgroup on the news server. Yet, this article will still be propagated to other peers, if appropriate. Otherwise, in case this article is crossposted to some other valid groups, it will be filed only into the valid newsgroups it is crossposted to. NOTE: Instead of not filing at all an article posted to a newsgroup with status "j", a news server MAY file it under a catch-all group. When a news server uses a catch-all group to file the articles posted to newsgroups with status "j", this catch-all group SHOULD be named "junk". (The first letter of the "junk" newsgroup explains why this status has been called "j".) Consequently, when a news server carries the "junk" newsgroup and uses it for the purpose of the "j" status, the "junk" newsgroup contains all postings not filed under another newsgroup, whatever the status of the "junk" newsgroup is. (However, an article posted explicitly to "junk" is treated according to the status of the "junk" newsgroup.) This newsgroup may be available to news readers and is often used by a news server as a way to locally store an article with the view to transmitting it to its peers (which may carry some of the newsgroups the article was posted to). Besides, instead of rejecting an article which contains an invalid Newsgroups header or which is posted to newsgroups it does not carry, a news server may accept such an article and file it under this catch-all "junk" newsgroup. Depending on the configuration of the news server, mentioning a newsgroup with status "j" is different than simply not listing the group, since articles arriving in unknown newsgroups may be rejected. When the status field begins with an equal sign ("=" or %x3D), the Elie Expires July 12, 2010 [Page 17] Internet-Draft NNTP Additions to LIST Command January 2010 name of an existing newsgroup on the news server MUST immediately follow the sign. If the status field of "foo.bar" is "=other.group", it means that "foo.bar" is an alias for "other.group". These two newsgroups are distinct; they do not share their articles or their article numbers. Local postings to "foo.bar" are not allowed, but articles from peers are accepted for "foo.bar" and filed into "other.group", regardless of the status of "other.group". The contents of their Newsgroups headers MUST NOT be altered. Alias groups are typically used during a transition between two newsgroups, including but not limited to a renaming of a group, or a correction of a misspelled group name. An alias SHOULD NOT point to another alias group. The newsgroup an alias points to SHOULD exist on the news server. If an alias is listed in the active list, the newsgroup it points to is not also listed in the active list when a wildmat is given to the LIST ACTIVE command, and the name of the newsgroup the alias points to does not match this wildmat. NOTE: If a server files newsgroups with status "j" into "junk", a newsgroup with status "j" and a newsgroup with status "=junk" are different. An article fed by a peer, and crossposted to a group with status "j", will result in the article being filed only in "junk" if there are no other groups with which to file it, or otherwise only in other valid newsgroups it is crossposted to. Whereas an article fed by a peer, and crossposted to a group with status "=junk", will result in the article being filed in "junk" and in other valid newsgroups it is crossposted to. The following table summarizes what usually happens to an article posted to only the newsgroup "foo.bar", depending on its status field on the news server: +--------------+-----------+------------+------------+--------------+ | Status field | Accepted | Accepted | Moderation | Destination | | of "foo.bar" | if local | from | needed? | if accepted? | | | posting? | peers? | | | +--------------+-----------+------------+------------+--------------+ | y | Yes | Yes | No | foo.bar | | n | No | Yes | No | foo.bar | | m | Yes | Yes | Yes | foo.bar | | Y | Yes | No | No | foo.bar | | M | Yes | No | Yes | foo.bar | | x | No | No | No | | | j | No | Yes | No | junk (if | | | | | | filed) | Elie Expires July 12, 2010 [Page 18] Internet-Draft NNTP Additions to LIST Command January 2010 | =other.group | No | Yes | No | other.group | +--------------+-----------+------------+------------+--------------+ The following table summarizes what usually happens to an article crossposted to the newsgroup "foo.bar" and a valid newsgroup "misc.test" (whose status field is "y") known by the news server, depending on the status field of "foo.bar" on the news server: +--------------+-----------+------------+------------+--------------+ | Status field | Accepted | Accepted | Moderation | Destination | | of "foo.bar" | if local | from | needed? | if accepted? | | | posting? | peers? | | | +--------------+-----------+------------+------------+--------------+ | y | Yes | Yes | No | foo.bar, | | | | | | misc.test | | n | No | Yes | No | foo.bar, | | | | | | misc.test | | m | Yes | Yes | Yes | foo.bar, | | | | | | misc.test | | Y | Yes | No | No | foo.bar, | | | | | | misc.test | | M | Yes | No | Yes | foo.bar, | | | | | | misc.test | | x | No | Yes | No | misc.test | | j | No | Yes | No | misc.test | | =other.group | No | Yes | No | other.group, | | | | | | misc.test | +--------------+-----------+------------+------------+--------------+ NOTE: The status of a newsgroup only indicates how articles arriving to that newsgroup are normally processed; news servers MAY provide clients with special privileges to allow or disallow some rights in these newsgroups. This specification defines neither these rights nor whether or not articles posted to these groups should be propagated to other peers. 3.2. Examples Example of an article posted to an alias group by a peer: Elie Expires July 12, 2010 [Page 19] Internet-Draft NNTP Additions to LIST Command January 2010 [C] LIST ACTIVE [S] 215 List of newsgroups follows [S] foo.bar 21 12 y [S] misc.test 3002322 3000234 =foo.bar [S] . [C] IHAVE [S] 335 Send it; end with . [C] Path: demo!.POSTED.somewhere!not-for-mail [C] From: "Demo User" [C] Newsgroups: misc.test [C] Subject: I am just a test article [C] Date: 18 Oct 2009 16:02:45 +0200 [C] Organization: An example, Paris, FR. [C] Message-ID: [C] [C] This is just a test article. [C] . [S] 235 Article transferred OK [C] LIST ACTIVE [S] 215 List of newsgroups follows [S] foo.bar 22 12 y [S] misc.test 3002322 3000234 =foo.bar [S] . [C] HDR Xref [S] 225 Header information follows [S] 0 news.server.com foo.bar:22 [S] . [C] HDR Newsgroups [S] 225 Header information follows [S] 0 misc.test [S] . The Newsgroups header of this article is kept untouched. This article is filed under "foo.bar" even though it has originally been posted, and still propagates to other peers, to the newsgroup "misc.test". Example of an article locally posted to an alias group: Elie Expires July 12, 2010 [Page 20] Internet-Draft NNTP Additions to LIST Command January 2010 [C] LIST ACTIVE [S] 215 List of newsgroups follows [S] foo.bar 22 12 y [S] misc.test 3002322 3000234 =foo.bar [S] . [C] POST [S] 340 Input article; end with . [C] From: "Demo User" [C] Newsgroups: misc.test [C] Subject: I am just a test article [C] [C] This is just a test article. [C] . [S] 441 Newsgroup "misc.test" has been renamed to "foo.bar" The article is rejected, with a detailed error. 4. Augmented BNF Syntax for These Additions to the LIST Command This section describes the formal syntax of the new LIST variants defined in this document using [RFC5234]. It extends the syntax in Section 9 of [RFC3977], and non-terminals not defined in this document are defined there. The [RFC3977] ABNF should be imported first before attempting to validate these rules. 4.1. Commands This syntax extends the non-terminal which represents the variants of the LIST command. ; counts list-arguments =/ "COUNTS" [WS wildmat] ; distributions, moderators, motd list-arguments =/ "DISTRIBUTIONS" / "MODERATORS" / "MOTD" ; subscriptions list-arguments =/ "SUBSCRIPTIONS" [WS wildmat] 4.2. Responses This syntax extends the non-terminals and which respectively represent the status field returned by the LIST ACTIVE command and the response contents for the LIST command. Elie Expires July 12, 2010 [Page 21] Internet-Draft NNTP Additions to LIST Command January 2010 ; active newsgroup-status =/ %x59 / %x4d / ; case-sensitive "Y" and "M" %x78 / %x6a / ; case-sensitive "x" and "j" newsgroup-alias newsgroup-alias = "=" newsgroup-name ; counts list-content =/ list-counts-content list-counts-content = *(newsgroup-name 3(SPA article-number) SPA newsgroup-status CRLF) ; distributions list-content =/ list-distributions-content list-distributions-content = *(distribution WS distribution-description CRLF) distribution-description = S-TEXT ; moderators list-content =/ list-moderators-content list-moderators-content = *(wildmat ":" moderators-address CRLF) moderators-address = S-TEXT ; motd list-content =/ list-motd-content list-motd-content = *(*U-CHAR CRLF) ; subscriptions list-content =/ list-subscriptions-content list-subscriptions-content = *(newsgroup-name CRLF) 5. Internationalisation Considerations No new internationalisation considerations are introduced by this extension, beyond those already described in the core specification [RFC3977]. In particular, newsgroup names SHOULD be restricted to US-ASCII until a successor to [RFC5536] standardizes another approach. Distribution descriptions and the message of the day MUST be in UTF-8. 6. Security Considerations No new security considerations are introduced by this extension, beyond those already described in the core specification [RFC3977] Elie Expires July 12, 2010 [Page 22] Internet-Draft NNTP Additions to LIST Command January 2010 and the Netnews Architecture and Protocol [RFC5537] (especially distribution leakage and e-mail Denial of Service during the moderation process). 7. 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 This extension provides additional keywords to the existing LIST capability defined in Section 7.6 of [RFC3977]. New status are also added to the ACTIVE variant of the LIST command. o The capability label that this extension extends is "LIST". o This extension adds five optional arguments to the "LIST" capability label: "COUNTS", "DISTRIBUTIONS", "MODERATORS", "MOTD", and "SUBSCRIPTIONS", indicating which new variants of the LIST command are supported. o This extension defines five new commands, LIST COUNTS, LIST DISTRIBUTIONS, LIST MODERATORS, LIST MOTD, and LIST SUBSCRIPTIONS, whose behaviour, arguments, and responses are defined in Sections 2.2, 2.3, 2.4, 2.5, and 2.6 respectively. o This extension does not associate any new responses with pre- existing NNTP commands. o This extension does not affect the maximum length of commands or initial response lines. o This extension does not alter pipelining, and the LIST COUNTS, LIST DISTRIBUTIONS, LIST MODERATORS, LIST MOTD, and LIST SUBSCRIPTIONS commands can be pipelined. o Use of this extension does not alter the capabilities list. o This extension does not cause any pre-existing command to produce a 401, 480, or 483 response. o This extension is unaffected by any use of the MODE READER command. o This extension does not affect the overall behaviour of a server or client than via the new commands. o Published Specification: This document. Elie Expires July 12, 2010 [Page 23] Internet-Draft NNTP Additions to LIST Command January 2010 o Contact for Further Information: Author of this document. 8. Acknowledgements The author gratefully acknowledges the comments and additional information provided by Russ Allbery, Urs Janssen, Antti-Juhani Kaijanaho, and D. Stussy on this document. Special thanks are due to: Stan Barber, whose [RFC2980] served as the initial basis for the DISTRIBUTIONS and SUBSCRIPTIONS variants of the LIST command; Brian Hernacki, whose [I-D.draft-hernacki-nntplist] draft served as the initial basis for the MOTD and also SUBSCRIPTIONS variants of the LIST command; the authors of the documentation of a few sample files of the InterNetNews news server ("active", "distributions", "moderators", "motd.news", and "subscriptions"): Russ Allbery, Bettina Fink, Rich Salz and a few other people to whom I am also grateful. 9. References 9.1. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC3977] Feather, C., "Network News Transfer Protocol (NNTP)", RFC 3977, October 2006. [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, January 2008. 9.2. Informative References [ASCII] American National Standards Institute, "Coded Character Sets - 7-Bit American Standard Code for Information Interchange (7-Bit ASCII), ANSI X3.4", 1986. [I-D.draft-hernacki-nntplist] Hernacki, B., "NNTP LIST Additions", draft-hernacki-nntplist-02 (work in Elie Expires July 12, 2010 [Page 24] Internet-Draft NNTP Additions to LIST Command January 2010 progress), July 2007. [RFC2980] Barber, S., "Common NNTP Extensions", RFC 2980, October 2000. [RFC5536] Murchison, K., Lindsey, C., and D. Kohn, "Netnews Article Format", RFC 5536, November 2009. [RFC5537] Allbery, R. and C. Lindsey, "Netnews Architecture and Protocols", RFC 5537, November 2009. [I-D.ietf-usefor-useage] Lindsey, C., "Usenet Best Practice", draft-ietf-usefor-useage-01 (work in progress), March 2005. Appendix A. Document History (to be removed by RFC Editor before publication) Appendix A.1. Changes from -00 o Add this appendix. o Acknowledge Antti-Juhani Kaijanaho's and D. Stussy's remarks. o Refer to USEFOR (RFC 5536) and USEAGE instead of putting a SHOULD requirement on the name of newsgroups in the example of the LIST MODERATORS command. Besides, the note was only related to the presence of "%s" in the submission address. o Mention that every moderated newsgroup name SHOULD have a matching line in LIST MODERATORS. o The presence of "+" in the name of a newsgroup is a matter of configuration and should not be dealt with in this memo. If any special interpretation is applied by the MTA or MDA of the receiving site, and if they want to host a submission address for a moderated group determined by a "%s" pattern rule, they will need to suppress that interpretation. o Lowercase a "MAY" for the reject of articles arriving in unknown newsgroups. o The meaning of the "j" status flag has changed: the "junk" newsgroup is no longer required. A group with status "j" now only means that no articles are filed under it. Moreover, local postings to "j" newsgroups are not accepted. Elie Expires July 12, 2010 [Page 25] Internet-Draft NNTP Additions to LIST Command January 2010 o Add an explanation about how the status of the "junk" newsgroup affects articles posted to "junk" or newsgroups with status "j". o Add a note about the difference between the "j" and "=junk" status. o The status of the newsgroup to which an alias group points is no longer checked. An article is directly filed under it. Besides, the requirement for an alias not pointing to another alias group becomes a SHOULD NOT instead of a MUST NOT. o Add an example of article locally posted to an alias group. o Remove the fact that if a news server may accept articles from a client during the session (possibly after successful authentication), it SHOULD NOT return a status like "n" or "x" which suggests that articles are not accepted in the corresponding newsgroup. o Document the "Y" and "M" status. o Document the COUNTS variant for the LIST command. o The "r" status flag will be documented in another (experimental) draft. A new REMOVALS variant for the LIST command is needed. o Add a reference to [ASCII]. Author's Address Julien Elie 13 rue Marx Dormoy Noisy-le-Grand 93160 France EMail: julien@trigofacile.com URI: http://www.trigofacile.com/ Elie Expires July 12, 2010 [Page 26]