The Network News Transfer Protocol (NNTP) is used for the distribution, inquiry, retrieval, and posting of news articles using a reliable stream-based mechanism, usually TCP/IP. It facilitates the exchange of news messages and articles between servers and between clients and servers in a network.
What Is Network News Transfer Protocol (NNTP)?
NNTP is an application layer protocol that enables the efficient distribution, inquiry, and retrieval of news articles from various news databases and forums across the Internet and Usenet. Designed to be used over TCP/IP networks, NNTP supports client-server and server-server operations, making it highly scalable and flexible for news distribution.
Short History of NNTP
NNTP was developed in the 1980s to improve the UUCP (UNIX-to-Unix Copy Protocol) for distributing news articles over the Usenet network, a global discussion system. The first specification, RFC 977, was published in 1986, outlining NNTP's initial framework and operation. Over the years, NNTP has undergone revisions and updates to improve performance, security, and capabilities, with notable updates including RFC 3977, which standardized the protocol in 2006.
NNTP (Network News Transfer Protocol) continues to hold a niche but significant place in the digital communication landscape, particularly for Usenet newsgroups. Despite the rise of more modern forms of digital communication such as social media platforms, forums, and messaging apps, NNTP and Usenet serve a dedicated user base with specific interests and needs.
How Does NNTP Work?
NNTP operates on a client-server model where a client requests news articles from web servers hosting and distributing newsgroups. Each newsgroup focuses on a specific topic, and the articles within them are distributed as messages. When a user subscribes to a newsgroup, the NNTP client retrieves the list of available articles from the server. Users can then select articles to read, post new articles, or respond to existing ones. NNTP servers can also communicate with each other to propagate newsgroup articles across the Internet, ensuring that articles are widely distributed and available.
Where Is NNTP Used?
NNTP is primarily used in the Usenet system, a collection of newsgroups covering a wide range of topics. It is used for distributing news articles, participating in discussions, and sharing information across different domains. Although overshadowed by social media platforms in the past decades, Usenet and NNTP remain popular for specific applications, including software distribution, technical discussions, and academic communication.
NNTP Commands and Status Codes
Here are two tables that outline the NNTP protocol's capabilities and the server responses one might encounter while interacting with an NNTP server.
NNTP Commands Table
NNTP commands are instructions sent from a client to an NNTP server to perform specific actions, such as posting articles or retrieving them.
Command | Description |
ARTICLE | Retrieves a specific article using an article number or message ID. |
BODY | Retrieves the body of a specific article. |
HEAD | Retrieves the header of a specific article. |
STAT | Checks the existence of a specific article without downloading it. |
GROUP | Selects a newsgroup and returns information about the group. |
LIST | Lists available newsgroups, active newsgroups, or information about them. |
NEWGROUPS | Lists newsgroups created after a specified date and time. |
POST | Posts an article to a newsgroup. |
QUIT | Terminates the session with the NNTP server. |
IHAVE | Informs the server about an article a client has that the server might not. |
HELP | Returns help text from the server. |
LAST | Moves the current article pointer to the previous article in the group. |
NEXT | Moves the current article pointer to the next article in the group. |
LISTGROUP | Lists the articles available in a specified newsgroup. |
MODE READER | Switches the server to reader mode, necessary for some servers. |
XOVER | Retrieves a range of article headers in a compact format. |
XHDR | Retrieves specific header information from a range of articles. |
NNTP Status Codes Table
Service servers use Status codes to indicate the outcome of a client's command, providing feedback on the operation's success or detailing errors encountered.
Status Code | Meaning |
100 | Help text follows (informational response). |
200 | Service available, posting allowed (greeting message). |
201 | Service available, no posting allowed (greeting message). |
211 | Group selected; information follows. |
215 | Information follows (in response to LIST, NEWGROUPS, etc.). |
220 | Article follows (in response to ARTICLE, HEAD, BODY, or STAT). |
221 | Header follows (in response to XHDR). |
222 | Body follows (in response to BODY command). |
223 | Article exists (in response to STAT). |
230 | New articles follow (in response to NEWNEWS). |
231 | New newsgroups follow (in response to NEWGROUPS). |
281 | Authentication accepted. |
400 | Service temporarily unavailable (server may shut down). |
411 | No such newsgroup (cannot select group). |
412 | No newsgroup selected (need to select one first). |
420 | No current article selected (for NEXT, LAST commands). |
421 | No next article (in this group). |
430 | No such article found. |
440 | Posting not allowed (in response to POST). |
441 | Posting failed (article not posted). |
480 | Authentication required for command. |
500 | Command not recognized or syntax error. |
502 | Service permanently unavailable or no permission. |