nntpid
nntpid - retrieve a single article from a news server
nntpid [ -v ] [ -d ] message-id
nntpid [ -v ] [ -d ] newsgroup-name article-number
nntpid [ -v ] -a newsgroup-name
nntpid makes a connection to a news server, retrieves one or more articles, and displays it.
You can specify the article you want by either:
By default, nntpid will try to display the article using a pager (more(1), unless you have specified an alternative in the environment variable PAGER). This is partly for convenience, and partly a mild security measure: it gives you some protection against the news article potentially containing control sequences that cause unexpected behaviour in your terminal. If nntpid detects that its standard output is not a terminal, however, it will bypass the pager and just write out the article directly.
There is a third mode of operation, enabled by the -a option, in which nntpid retrieves all available articles in the group and writes them to standard output in mbox format.
If you specify one argument, nntpid assumes it is a Message-ID. The angle brackets that usually delimit Message-IDs are optional; nntpid will strip them off if it sees them, and will not complain if it does not.
If you specify two arguments, nntpid will interpret the first as a newsgroup name, and the second as an article number.
-v
nntpid will log its entire conversation with the news server on standard error.
-d
nntpid will write the article straight to standard output without bothering to try using a pager.
-a
nntpid will always write straight to standard output (so the -d option is unnecessary).
Currently, the only form of authentication supported by nntpid is AUTHINFO GENERIC, using the environment variable NNTPAUTH. It will only attempt this if it receives a 480 response from the news server; if your news server never sends 480 then nntpid will never even look at NNTPAUTH.
nntpid is free software, distributed under the MIT licence. Type nntpid --licence to see the full licence text.