MaasInfo.NNTP = Instructions for accessing NetNews Transfer Protocol
servers manually for reading UseNet newsgroups. Version of 1993.Apr.02.
Although the information hererin is mostly public domain, this
particular organization of the information is Copyright 1991, 1992,
1993 by Robert Elton Maas, all rights reserved. This file is posted as
trivial shareware. If it is worth more than a dollar to you, contact
the author to arrange payment by giving the author some other
information of comparable value the author wants and/or get the file
MaasInfo.SQWA which is a listing of Specific Questions Waiting for
Answers which the author has already decided are acceptable for payment
of your trivial-shareware "fee", or even better help the author find
employment (now 1.5 years unemployed, deep in debt, and going $700
deeper into debt each month I remain unemployed).

The author can be contacted by e-mail: rem@BTR.Com
 voice telephone: 415-969-2958


%% NNTP, ONLINE MANUAL-TELNET ACCESS

It is assumed you have an account on an InterNet computer with direct
TCP/IP access, and that said computer has a TELNET user program that lets
you connect to other TCP/IP hosts, and that said TELNET program allows
you to select some port number other than the default TELNET port.

NNTP is a protocol described in RFC977 by which a NNTP server program
is accessible to a NNTP client program. The server program has an
archive of lots of articles from lots of UseNet newsgroups, and the
client program wants to obtain copies of some of those articles on
behalf of one or more users. But the commands that the client program
sends to the server program are in plain ASCII text and are quite
simple, while the data sent from the server program to the client
program are plain text headers and contents of articles. Consequently
it's possible for a user without the services of any program except
barebones TELNET to pretend to be a client program and connect to the
server program, then to manually issue commands exactly like a client
program would have, then to read the text coming back to decide which
command to issue next.

First you need to know how to use TELNET at your host, and how to select
a host and port number. On many systems you simply type TELNET followed
by the name (or internet host number) of the host followed by the number
of the port. (Omit the port number to get the normal TELNET port; but for
NNTP you *must* specify the port number.) If your TELNET program uses a
different syntax, you'll have to ask somebody local to your system.

Next you need to know the name or internet host number of some host
providing NNTP service. At present I know of only five that are
available for general InterNet usage:
sol.ctr.columbia.edu (128.59.64.40) (posting ok)
rusmv1.rus.uni-stuttgart.de (129.69.1.12) (Connection refused)
news.fu-berlin.de = gibb.math.fu-berlin.de (130.133.4.250) (posting ok)
newsserver.rrzn.uni-hannover.de (130.75.2.1) (posting ok)
umd5.umd.edu (128.8.10.5) (no posting)
If you know of any other NNTP servers, or how to get a complete list of
them, please send that info to the author. Meanwhile, as best I know,
there is no index of NNTP servers, so finding a NNTP server for you may
be difficult. One suggestion is to look at the headers of messages
posted on Internet mailing lists that are linked from Usenet newsgroups
(or browse the ones listed above via NNTP if any of them are still
available by the time you read this). Some of these headers will show
the NNTP originating site, and you can look for one near you and then
check to see if that host has an NNTP server and if it will talk to
you, and if not you can contact the person who posted the article or
the Postmaster at that host to check if either of them know about other
UseNet hosts in the vicinity that might provide NNTP service to your
host.

Next you need to know the port number for NNTP service. It's 119. Thus to
connect to NNTP service at umd5.umd.edu, you say:
telnet umd5.umd.edu 119
or if your host doesn't know that name, you say:
telnet 128.8.10.5 119
or whatever the corresponding syntax is for the TELNET program you use.

Once you get connected, you need to select a newsgroup and then request
headers and/or bodies of messages. You may also want to have the server
print out a complete list of all newsgroups it knows about, but that is
more than 60,000 characters of text so you'd better be saving a
transcript to a file so you don't have to do it a second time.

To select a newsgroup, select a position (article number) within that
newsgroup, and look at headers and bodies of articles, for each such
action you issue a one-line command and then wait for the server to
send you all the text that results. The command lines always start with
a keyword (command name), whereas the replies always start with a
numeric code then a text message, then may have additional lines of
text ending with a line containing a single period. You may ignore the
numeric reply codes unless you want to understand the guts of the
protocol or write an automated browser.

Below are the most useful commands for browsing UseNet articles:

GROUP <NameOfGroup> -- Select a particular newsgroup, print out the Low
and High article numbers and an approximate count of articles, and set
the pointer to the first article of the group. If you now issue another
command (HEAD BODY or ARTICLE) without numeric argument, it uses the
first article. -- The very first command you issue may be rejected due to
a bug somewhere in the interface. If the server says "500 Command
unrecognized", try exactly the same command a second time.

HEAD <NumberOfArticle> -- Move the pointer to the article (in the
previously-selected newsgroup) which has that number, and print out just
the header.

NEXT -- Move the pointer forward to the next more-recent article (in the
same previously-selected newsgroup).

LAST -- Move the pointer backward to the next less-recent article (in
the same previously-selected newsgroup). (Warning, 'LAST' is a misnomer
which really means 'PREVious', not 'most recent', so don't get
confused; don't blame me, I didn't write the command language.)

HEAD -- Without moving the pointer, print the header of the
currently-selected article.

BODY -- Without moving the pointer, print the body of the
currently-selected article.

By doing HEAD <NumberOfOldestArticle> then alternating NEXT and HEAD, you
can browse headers from oldest forward. Alternately by doing HEAD
<NumberOfNewestArticle> then alternating LAST and HEAD, you can browse
headers from newest backward. Either way, when you see an article you
want to see the body of, simply say BODY.

ARTICLE -- Without moving the pointer, print the whole (header & body) of
the currently-selected article. This may be useful if you're downloading
a whole set of articles without any prior selection. You alternate LAST
and ARTICLE, or NEXT and ARTICLE, to download articles in sequence
forward or backward in time.

LIST -- List *all* newsgroups the server knows about. As I said before,
this generates more than 60 thousand characters of output, or maybe
several hundred thousand characters if there are over 5000 newsgroups
on that host, so beware! You will want to do this only once in a very
long while, and collect all the data to a file which you then search
locally from time to time.

HELP -- Print a list of available commands. Beware, don't use commands
like IHAVE or SLAVE that are supposed to be used for NNTP daemon
programs relaying articles, or POST that are supposed to be used for
client-programs posting new articles, since they are too dangerous to
be used manually. When in doubt, consult the RFC977 and avoid anything
that modifies the state of the server in any way other than selecting
your newsgroup and article pointer. Probably you won't need any
commands except the ones I listed above.

(After you get very experienced at using NNTP, you might want to read
the RFC and VERY CAREFULLY try posting via NNTP. I suggest you get a
posting template from somebody more expert, and use copy&paste very
carefully to replace fields with appropriate data, then check it
several times to be sure it's correct, then use some automated means
such as copy&paste or standard-input to feed it to the NNTP server. But
don't blame me if you screw up and the whole net gets mad at you.)

XHDR <HeaderFieldName> <ArticleRange> -- This is not a standard
command. See if it is listed in HELP before using it. This allows you
to quickly get a list of a single field from the headers of a whole
bunch of consecutive articles by issuing a single command. The most
common usage is to get a list of Subject: fields. The ArticleRange can
be either two numbers separated by a hyphen (resulting in all articles
between the two numbers, inclusively), or a single number followed by
hyphen (resulting in all articles from that number forward to the most
recent).


Sample session, with comments. (Each line beginning with ;; is a comment.)

TELNET 128.104.230.12 119
;;That was the command to connect to the NNTP server.
;;Next is the junk that is typed out during connection...
VM TCP/IP Telnet R1.2.1
Connecting to 128.104.230.12, port 119
Using Line Mode...
Notes on using Telnet when in Line Mode:
- To hide Password, Hit PF3 or PF15
- To enter Telnet Command, Hit PF4-12, or PF16-24
                                                 MORE...   SUWATSON
201 uakari.primate.wisc.edu NNTP server version 1.5.3 (18 Sep 88) ready
 at Wed Jun 12 21:56:34 1991 (no posting).
group comp.lang.lisp
500 Command unrecognized.
;;Like I said, some bug causes it to reject the first command.
group comp.lang.lisp
211 29 3294 3323 comp.lang.lisp
;;That time it worked. I forget what 211 and 29 mean, but 3294 is the
;; number of the oldest article and 3323 is the number of the newest
;; article.
;;Let's start from the most recent and work backwards in time:
head 3323
;;That was the command, below is the resultant output...
221 3323 <1991Jun13.003122.19863@cs.cmu.edu> Article retrieved; head follows.
Path: uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!sei.c
mu.edu!fs7.ece.cmu.edu!o.gp.cs.cmu.edu!ram
From: ram+@cs.cmu.edu (Rob MacLachlan)
Newsgroups: comp.lang.lisp
Subject: Re: isqrt
Message-ID: <1991Jun13.003122.19863@cs.cmu.edu>
Date: 13 Jun 91 00:31:22 GMT
References: <676362388.61@egsgate.FidoNet.Org>
Sender: netnews@cs.cmu.edu (USENET News Group Software)
Organization: School of Computer Science, Carnegie Mellon
Lines: 77
Return-path: <FILESERV-Mgr@SHSU.edu>
