RFC 5538

The 'news' and 'nntp' URI Schemes

πŸ“… published April 2010, from ietf

The 'news' and 'nntp' URI Schemes πŸ’–

okay bestie, let's start with the basics πŸŽ€ This is RFC 5538, published by the IETF in April 2010 as a Standards Track document (ISSN 2070-1721). It was written by F. Ellermann and xyzzy. The title block doesn't list anything it obsoletes or updates, so that's a clean slate 🫢

Abstract ✨

So the whole point of this memo is to specify the 'news' and 'nntp' Uniform Resource Identifier (URI) schemes, which were first defined back in RFC 1738 πŸ¦‹ The goal is to let RFC 1738 be made obsolete while keeping everything about these two schemes on the Standards Track. Very organized, very iconic.

Status of This Memo

This is an Internet Standards Track document. πŸ”₯

It's a product of the Internet Engineering Task Force (IETF), so it represents the consensus of the IETF community. It got public review and was approved for publication by the Internet Engineering Steering Group (IESG). If you want more info on Internet Standards, check Section 2 of RFC 5741 πŸ’…

Info about the current status of this document, any errata, and how to send feedback can be found at http://www.rfc-editor.org/info/5538 🌸

The IETF Trust and the people listed as document authors own the copyright for 2010. All rights are reserved 🌈

This document is governed by BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info), as they stand on the publication date. Read those carefully, because they spell out your rights and restrictions for this document. Any Code Components pulled out of this document must include the Simplified BSD License text described in Section 4.e of the Trust Legal Provisions, and they come with no warranty, as the Simplified BSD License describes 🧚

Some of this document may contain material from IETF Documents or IETF Contributions that were published or made publicly available before November 10, 2008. The people who control the copyright in some of that material may not have given the IETF Trust permission to allow modifications outside the IETF Standards Process. So, unless you get an adequate license from those copyright holders, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside that process. The exceptions are formatting it for publication as an RFC or translating it into languages other than English πŸ’œ

Table of Contents

1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
2.  Background . . . . . . . . . . . . . . . . . . . . . . . . . .  3
  2.1.  'nntp' URIs  . . . . . . . . . . . . . . . . . . . . . . .  3
  2.2.  'news' URIs  . . . . . . . . . . . . . . . . . . . . . . .  4
  2.3.  Query Parts, Fragments, and Normalization  . . . . . . . .  5
3.  Syntax of 'nntp' URIs  . . . . . . . . . . . . . . . . . . . .  5
4.  Syntax of 'news' URIs  . . . . . . . . . . . . . . . . . . . .  6
5.  Acknowledgments  . . . . . . . . . . . . . . . . . . . . . . .  7
6.  Internationalization Considerations  . . . . . . . . . . . . .  8
7.  Security Considerations  . . . . . . . . . . . . . . . . . . .  8
8.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . .  8
  8.1.  'snews' URIs . . . . . . . . . . . . . . . . . . . . . . .  9
  8.2.  'news-message-ID' Access Type  . . . . . . . . . . . . . . 10
9.  References . . . . . . . . . . . . . . . . . . . . . . . . . . 10
  9.1.  Normative References . . . . . . . . . . . . . . . . . . . 10
  9.2.  Informative References . . . . . . . . . . . . . . . . . . 11
Appendix A.  Collected ABNF  . . . . . . . . . . . . . . . . . . . 13
Appendix B.  Detailed Example  . . . . . . . . . . . . . . . . . . 13

1. Introduction πŸŽ€

The first definition for a lot of URI schemes shows up in [RFC1738]. This memo pulls the 'news' and 'nntp' URI schemes out of it, so that material can stay on the Standards Track if [RFC1738] gets moved to "historic" status πŸ¦‹ It's part of a series of similar documents, like [RFC4156], [RFC4157], [RFC4248], and [RFC4266], which get discussed on the <mailto:uri@w3.org> list.

The definitions for the 'news' and 'nntp' URI schemes here are updates from [RFC1738], based on how these schemes are used today ✨ This memo also keeps its description of the 'news' URI scheme pretty focused on the essential features that are supposed to work with "any browser" and Network News Transfer Protocol (NNTP) server. Keeping it simple, bestie πŸ’…

[RFC3986] explains how to define schemes for URIs, and it also explains the term "Uniform Resource Locator" (URL). NNTP is specified in [RFC3977]. The Netnews Article Format is defined in [RFC5536] 🌸

The key word "MUST" in this memo is to be interpreted as described in [RFC2119]. UTF-8 is specified in [RFC3629]. The syntax uses the ABNF defined in [RFC5234] 🧚

2. Background 🌈

The 'news' and 'nntp' URI schemes identify resources on an NNTP server. That can mean individual articles, individual newsgroups, or sets of newsgroups πŸ’œ

User agents like Web browsers that support these schemes use the NNTP protocol to access the matching resources. How they do that, for example with a separate newsreader or an integrated one, depends on the implementation 🫢 The default <port> associated with NNTP in [RFC3977] is 119 πŸ“

2.1. 'nntp' URIs

The 'nntp' URI scheme identifies articles in a newsgroup on a specific NNTP server. In [RFC3986] terms, that means 'nntp' URIs have a non-empty <authority> component. There's no default <host> like there is for the 'file' or 'news' URI schemes πŸ”₯

Netnews is usually spread across several news servers that use the same newsgroup names but different local article numbers. So an article that's number 10 in group "example" on server "news.example.com" most likely has a different number on any other server where that same article is still available. Also, users who are allowed to read and post articles on "their" server might not be allowed to access articles on an "arbitrary" server named in an 'nntp' URI πŸ™ˆ

Because of all that, the 'nntp' URI scheme is pretty limited. It's also less widely supported by user agents than the similar 'news' URI scheme πŸ’€

2.2. 'news' URIs

The 'news' URI scheme identifies articles by their worldwide unique "Message-ID", no matter which server or newsgroup they're on πŸ¦‹ Newsreaders already support getting articles by their "Message-ID" without needing a URI scheme. In simple cases they do it directly, as an NNTP client of a default or currently used server that the user configured. More general user agents use the 'news' URI scheme to tell "Message-IDs" apart from similar constructs from other URI schemes, in places like a plain text message body ✨

The 'news' URI scheme also lets you identify newsgroups or sets of newsgroups without tying them to one specific server. For Netnews, a group "example" has the same name on any server that carries it, except for weird gateway cases πŸ‘‘ To tell "Message-IDs" and newsgroup names apart, the 'news' URI scheme relies on the "@" between the local part (left-hand side) and the domain part (right-hand side) of "Message-IDs" πŸŽ€

[RFC1738] only offered one wildcard for sets of newsgroups in 'news' URIs: a "*" meaning "all available newsgroups". In common practice, different user agents stretched that to varying degrees. An NNTP extension called <wildmat>, which is specified in [RFC2980] and is now part of the base NNTP specification, allows pattern matching in the style of the [POSIX] "find" command 🌈 For this memo, that means some extra special characters have to be allowed in 'news' URIs. Some of them get percent-encoded, as the overall [RFC3986] URI syntax requires. User agents and NNTP servers that aren't compliant with [RFC3977] yet don't implement all parts of this new feature πŸ’–

Another addition to the [RFC1738] syntax that's commonly supported is an optional server specification at the start of 'news' URIs. This optional <authority> component follows the overall [RFC3986] syntax. It's preceded by a double slash "//" and ends at the next slash "/", question mark "?", number sign "#", or the end of the URI 🧚

2.3. Query Parts, Fragments, and Normalization

Fragments that start with a number sign "#" are specified in [RFC3986]. Their semantics don't depend on the URI scheme, and how they get resolved depends on the media type πŸ¦‹

This memo doesn't specify a query part that starts with a question mark "?" for the 'news' and 'nntp' URI schemes. Still, some implementations are known to use query parts instead of fragments internally, to address parts of a composite media type [RFC2046] in Multipurpose Internet Mail Extensions (MIME) 🫢

There are no special "." or ".." path segments in 'news' and 'nntp' URLs. Please note that "." and ".." are not valid <newsgroup-name>s ✨

URI producers have to percent-encode some characters, as specified below (Section 4). Otherwise, they MUST treat a "Message-ID" without angle brackets for 'news' URLs as is, which means case-sensitive πŸ”₯

4. Syntax of 'news' URIs ✨

okay so a 'news' URI either points to one specific article by its unique "Message-ID" πŸ’Œ or to a set of newsgroups πŸ“°. it can also name a server πŸ–₯️, and if you leave that out, the configured default server for Netnews access gets used 🫢

newsURL         = "news:" [ server "/" ] ( article / newsgroups )
article         = msg-id-core                  ; see RFC 5536

the form for an <article> is the <msg-id-core> from [RFC5536], which is basically a "Message-ID" without the angle brackets πŸ’…. according to [RFC3986], characters that are in <gen-delims> (a subset of <reserved>), plus the character "%", MUST be percent-encoded. encoding other characters isn't wrong though 🌈. the ones in <msg-id-core> that need encoding are:

"/"  "?"  "#"  "[" "]" and "%"

also, an agent trying to interpret a 'news' URI needs to decode all the percent-encoded characters before passing it along to an NNTP server to act on 🧚

please note that "%3E" (">") is not allowed πŸ™…β€β™€οΈ. otherwise, <msg-id-core> is exactly the same as:

id-left "@" id-right

as defined in [RFC5322] πŸ’œ

the form for <newsgroups> matches the [RFC3977] <wildmat-pattern>, which is a newsgroup name with wildcards "*" and "?" πŸ“. any "?" has to be percent-encoded as "%3F" in this part of a URI, no exceptions bestie 😭

examples (the first two are equivalent) ✨:

news://news.server.example/*
news://news.server.example/
news://wild.server.example/example.group.th%3Fse
news:example.group.*
news:example.group.this

without wildcards, this form identifies a single group, as long as it isn't empty πŸ¦‹. user agents would typically try to show an overview of the articles in that group, probably limited to the newest unread ones up to a configured maximum πŸ“¬.

with wildcards, user agents could try to list the matching group names on the specified or default server πŸ”. some user agents only support a specific <group> without wildcards, or an optional single "*" πŸ™ˆ.

as noted above (Section 2.2), an "@" in a 'news' URI is what tells URI consumers whether they're looking at an <article> or <newsgroups> πŸŽ€. the new <message-id> construct in [RFC3977] doesn't require an "@". ever since [RFC0822], the "Message-ID" syntax has been closely related to mail addresses, with an "@" separating the left side (the local part of addresses, or the unique part of message identifiers) from the right side (the domain part). this memo sticks to the known [RFC1738] practice 🧸.


5. Acknowledgments 🫢

Henry Spencer was the driving force behind adopting MIME in Netnews πŸ‘‘. in 1993 he registered the MIME 'message/external-body' access type 'news-message-ID', which is discussed below (Section 8.2). that's recalled in "Son-of-1036" [RFC1849] ✨.

"The 'news' URL scheme" [GILMAN], by Alfred S. Gilman (March 1998), added things to the original [RFC1738] 'news' URI scheme 🌸. some of these ideas are now widely supported and are reflected by the revised 'news' URI scheme specified here πŸ’….

thanks to Alfred Hoenes, Charles Lindsey, Clive Feather, Chris Newman, Ken Murchinson, Kjetil T. Homme, Lars Magne Ingebrigtsen, Martin Duerst, Matt Seitz, Nicolas Krebs, Paul Hoffman, Pasi Eronen, Roy T. Fielding, Russ Allbery, Stephane Bortzmeyer, and Tom Petch for their feedback, contributions, and encouragement πŸ’–πŸŒˆ.

Bill Fenner's _xml2rfc validator_ and _ABNF checker_ were a huge help in making this memo (and not only this memo) πŸ”₯. the same goes for various great _IETF tools_ written by Henrik Levkowetz πŸ™Œ.


6. Internationalization Considerations 🌍

the URI schemes were updated to support percent-encoded UTF-8 characters in NNTP newsgroup names, as specified in [RFC3977] and [RFC3987] πŸ¦‹.

the Netnews Article Format in [RFC5536] doesn't allow UTF-8 in <newsgroup-name>s yet πŸ™ˆ. so the well-known Unicode and UTF-8 security considerations aren't listed below. for an overview, check out [UTR36] and [RFC3629] πŸ“š.

the work on Email Address Internationalization (EAI), which started in [RFC4952], isn't expected to change the syntax of a "Message-ID" πŸ’….


7. Security Considerations πŸ’€

⚠️ this section is serious, bestie, read it all!!

there are lots of security considerations for URI schemes discussed in [RFC3986] 😭. the NNTP protocol may use passwords in the clear for authentication, or offer no privacy at all. both of those are considered extremely unsafe in current practice 🚨. alternatives and further security considerations for NNTP are discussed in [RFC4642] and [RFC4643] πŸ”’.

the syntax for the 'news' and 'nntp' URI schemes includes the general <authority> construct with an optional <userinfo>, defined in [RFC3986]. as [RFC3986] notes, the "user:password" form of a <userinfo> is deprecated πŸ™…β€β™€οΈ.

articles on NNTP servers typically expire after some time πŸ—‘οΈ. after that, the matching 'news' and 'nntp' URLs may stop working, depending on the server πŸ’”. a "Message-ID" is supposed to be worldwide unique forever, but the NNTP protocol doesn't guarantee that 😬. depending on the servers and various conditions, the same "Message-ID" could end up being used for different articles, and attackers could try to distribute malicious content behind known 'news' or 'nntp' URLs πŸ‘€β˜ οΈ.

if a URI doesn't match the generic syntax in [RFC3986], it's invalid, and broken URIs can cause absolute havoc πŸŒͺ️. compare [RFC5064] for similar security considerations πŸ’….


8. IANA Considerations 🌸

the IANA registry of URI schemes has been updated to point to this memo instead of [RFC1738] for the 'news' and 'nntp' URI schemes πŸ“.

8.1. 'snews' URIs

this section contains the [RFC4395] template for registering the historical 'snews' scheme, which is specified in [GILMAN] πŸ¦‹:

URI scheme name:   snews

Status:            historical

URI scheme syntax: Same as for 'news' (Section 4)

URI scheme semantics:
                   Syntactically equivalent to 'news', but using NNTP
                   over SSL/TLS (SSL/TLS with security layer is
                   negotiated immediately after establishing the TCP
                   connection) with a default port of 563, registered
                   as "nntps"

Encoding considerations:
                   Same as for 'news' (Section 6)

Applications/protocols that use this URI scheme name:
                   For some user agents, 'snews' URLs trigger the use
                   of "nntps" instead of NNTP for their access on
                   Netnews

Interoperability considerations:
                   This URI scheme was not widely deployed; its
                   further use is deprecated in favor of ordinary
                   'news' URLs in conjunction with NNTP servers
                   supporting [RFC4642]

Security considerations:
                   See [RFC4642]; the use of a dedicated port for
                   secure variants of a protocol was discouraged in
                   [RFC2595]

Contact:           <mailto:uri@w3.org> (URI mailing list)

Change controller: IETF

References:        RFC 5538, [RFC4642], [GILMAN]

8.2. 'news-message-ID' Access Type

the MIME 'news-message-ID' access type was mistakenly listed as a subtype πŸ™ƒ. IANA has removed 'news-message-ID' from the application subtype registry and added it to the access types registry defined in [RFC4289] πŸŽ‰.

[RFC4289] requires an RFC (preferably on the Standards Track) for the access types registry πŸ“œ. so to give a definition that meets this requirement, the following paragraph is reproduced verbatim from [RFC1849] ✨:

   NOTE: In the specific case where it is desired to essentially make
   another article PART of the current one, e.g., for annotation of
   the other article, MIME's "message/external-body" convention can
   be used to do so without actual inclusion.  "news-message-ID" was
   registered as a standard external-body access method, with a
   mandatory NAME parameter giving the message ID and an optional
   SITE parameter suggesting an NNTP site that might have the article
   available (if it is not available locally), by IANA 22 June 1993.

please note that 'news' URLs offer a very similar and (today) more common way to access articles by their Message-ID πŸ“¬. compare [RFC2017] πŸ’–.


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.

[RFC3986]      Berners-Lee, T., Fielding, R., and L. Masinter,
               "Uniform Resource Identifier (URI): Generic Syntax",
               STD 66, RFC 3986, January 2005.

[RFC5234]      Crocker, D. and P. Overell, "Augmented BNF for Syntax
               Specifications: ABNF", STD 68, RFC 5234, January 2008.

[RFC5536]      Murchison, K., Lindsey, C., and D. Kohn, "Netnews
               Article Format", RFC 5536, November 2009.

9.2. Informative References πŸ“š

  • [GILMAN] Gilman, A., "The 'news' URL scheme", Work in Progress, March 1998.
  • [POSIX] Institute of Electrical and Electronics Engineers, "The Open Group Base Specifications Issue 6", IEEE Standard 1003.1, 2004 edition.
  • [RFC0822] Crocker, D., "Standard for the format of ARPA Internet text messages", STD 11, RFC 822, August 1982.
  • [RFC1738] Berners-Lee, T., Masinter, L., and M. McCahill, "Uniform Resource Locators (URL)", RFC 1738, December 1994.
  • [RFC1849] Spencer, H., ""Son of 1036": News Article Format and Transmission", RFC 1849, March 2010.
  • [RFC2017] Freed, N. and K. Moore, "Definition of the URL MIME External-Body Access-Type", RFC 2017, October 1996.
  • [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types", RFC 2046, November 1996.
  • [RFC2595] Newman, C., "Using TLS with IMAP, POP3 and ACAP", RFC 2595, June 1999.
  • [RFC2980] Barber, S., "Common NNTP Extensions", RFC 2980, October 2000.
  • [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD 63, RFC 3629, November 2003.
  • [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource Identifiers (IRIs)", RFC 3987, January 2005.
  • [RFC4156] Hoffman, P., "The wais URI Scheme", RFC 4156, August 2005.
  • [RFC4157] Hoffman, P., "The prospero URI Scheme", RFC 4157, August 2005.
  • [RFC4248] Hoffman, P., "The telnet URI Scheme", RFC 4248, October 2005.
  • [RFC4266] Hoffman, P., "The gopher URI Scheme", RFC 4266, November 2005.
  • [RFC4289] Freed, N. and J. Klensin, "Multipurpose Internet Mail Extensions (MIME) Part Four: Registration Procedures", BCP 13, RFC 4289, December 2005.
  • [RFC4395] Hansen, T., Hardie, T., and L. Masinter, "Guidelines and Registration Procedures for New URI Schemes", BCP 35, RFC 4395, February 2006.
  • [RFC4642] Murchison, K., Vinocur, J., and C. Newman, "Using Transport Layer Security (TLS) with Network News Transfer Protocol (NNTP)", RFC 4642, October 2006.
  • [RFC4643] Vinocur, J. and K. Murchison, "Network News Transfer Protocol (NNTP) Extension for Authentication", RFC 4643, October 2006.
  • [RFC4952] Klensin, J. and Y. Ko, "Overview and Framework for Internationalized Email", RFC 4952, July 2007.
  • [RFC5064] Duerst, M., "The Archived-At Message Header Field", RFC 5064, December 2007.
  • [RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322, October 2008.
  • [UTR36] Davis, M. and M. Suignard, "Unicode Security Considerations", Unicode Technical Reports #36, August 2006.

Appendix A. Collected ABNF ✨

Okay so on top of all the grammar we already went over, this appendix also lists where every term used in the comments and prose comes from. It's giving organized πŸ—‚οΈπŸ’…

nntpURL         = "nntp:" server "/" group [ "/" article-number ]
server          = "//" authority               ; see RFC 3986
group           = 1*( group-char / pct-encoded )
article-number  = 1*16DIGIT                    ; see RFC 3977
group-char      = ALPHA / DIGIT / "-" / "+" / "_" / "."

newsURL         = "news:" [ server "/" ] ( article / newsgroups )
article         = msg-id-core                  ; see RFC 5536
newsgroups      = *( group-char / pct-encoded / "*" )

authority       = <see RFC 3986 Section 3.2>
host            = <see RFC 3986 Section 3.2.2>
pct-encoded     = <see RFC 3986 Section 2.1>
port            = <see RFC 3986 Section 3.2.3>
gen-delims      = <see RFC 3986 Section 2.2>
msg-id-core     = <see RFC 5536 Section 3.1.3>
reserved        = <see RFC 5536 Section 2.2>
userinfo        = <see RFC 3986 Section 3.2.1>

message-id      = <see RFC 3977 Section 9.8>
UTF8-non-ascii  = <see RFC 3977 Section 9.8>
wildmat         = <see RFC 3977 Section 4.1>
wildmat-exact   = <see RFC 3977 Section 4.1>
wildmat-pattern = <see RFC 3977 Section 4.1>

ALPHA           = <see RFC 5234 Appendix B.1>
DIGIT           = <see RFC 5234 Appendix B.1>

article-locator = <see RFC 5536 Section 3.2.14>
newsgroup-name  = <see RFC 5536 Section 3.1.4>
xref            = <see RFC 5536 Section 3.2.14>

Appendix B. Detailed Example πŸ“

Here is an example of a mail to the <mailto:tools.discuss@ietf.org> list with "Message-ID" <p0624081dc30b8699bf9b@[10.20.30.108]>.

<http://dir.gmane.org/gmane.ietf.tools> is one of the various list archives. It converts mail into Netnews articles, and the header of this article contains the following fields (among others):

       Message-ID: <p0624081dc30b8699bf9b@[10.20.30.108]>
       Xref: news.gmane.org gmane.ietf.tools:742
       Archived-At: <http://permalink.gmane.org/gmane.ietf.tools/742>

The "Xref" roughly indicates the 742nd article in newsgroup <news://news.gmane.org/gmane.ietf.tools> on this server. An 'nntp' URL might be <nntp://news.gmane.org/gmane.ietf.tools/742>. For details about the "Archived-At" URL, see [RFC5064].

The list software and list subscribers reading the list elsewhere can't predict a server-specific article number 742 in this archive. If they know this server, they can however guess the corresponding <news://news.gmane.org/p0624081dc30b8699bf9b@%5B10.20.30.108%5D> URL.

In theory, the list software could use the guessed 'news' URL in an "Archived-At" header field, but if a list tries this, it would likely use <http://mid.gmane.org/p0624081dc30b8699bf9b@%5B10.20.30.108%5D>.

Using domain literals in a "Message-ID" could cause collisions. A collision might force the mail2news gateway in this example to invent a new "Message-ID", and an attempt to guess the future URL on this server would then fail. πŸ™ˆ

Author's Address πŸ’–

Frank Ellermann
xyzzy
Hamburg, Germany

EMail: hmdmhdfmhdjmzdtjmzdtzktdkztdjz@gmail.com
URI:   http://purl.net/xyzzy/
πŸ“¦ where this page comes from