moderated, and whether articles posted are actually stored or just passed on. These flags are described in detail in Chapter 23. An example looks like this:
list active
215 Newsgroups in form 'group high low flags'.
control 0000000000 0000000001 y
junk 0000000003 0000000001 y
alt.test 0000000000 0000000001 y
.
Posting an Article
We mentioned there was a difference between pushing an article and posting an article. When you are pushing an article, there is an implicit assumption that the article already exists, that it has a message identifier that has been uniquely assigned to it by the server to which it was originally posted, and that it has a complete set of headers. When posting an article, you are creating the article for the first time and the only headers you supply are those that are meaningful to you, such as the Subject and the Newgroups to which you are posting the article. The news server you post the article on will add all the other headers for you and create a message ID that it will use when pushing the article onto other servers.
All of this means that posting an article is even easier than pushing one. An example posting looks like this:
post
340 Ok
From: [email protected]
Subject: test message number 1
Newsgroups: junk
Body: This is a test message, please feel free to ignore it.
.
240 Article posted
We've generated two more messages like this one to give our following examples some realism.
Listing New Articles
When a newsreader first connects to a new server and the user chooses a newsgroup to browse, the newsreader will want to retrieve a list of new articles, those posted or received since the last login by the user. The
newnews junk 990101 000000
230 New news follows
.
Selecting a Group on Which to Operate
When the user selects a newsgroup to browse, the newsreader may tell the news server that the group was selected. This simplifies the interaction between newsreader and news server; it removes the need to constantly send the name of the newsgroup with each command. The
group junk
211 3 1 3 junk
The
Listing Articles in a Group
To address newsgroup articles, the newsreader must know which article numbers represent active articles. The
listgroup junk
211 Article list follows
1
2
3
.
Retrieving an Article Header Only
The user must have some information about an article before she can know whether she wishes to read it. We mentioned earlier that some commands allow the article header and body to be transferred separately. The
Articles may be referenced using either their number (from the
head 2
221 2 ‹[email protected]› head
Path: news.vbrew.com!not-for-mail
From: [email protected]
Newsgroups: junk
Subject: test message number 2
Date: 27 Apr 1999 21:51:50 GMT
Organization: The Virtual brewery