Книга: Linux Network Administrator Guide, Second Edition
Posting an Article
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.
- Connecting to the News Server
- Pushing a News Article onto a Server
- Changing to NNRP Reader Mode
- Listing Available Groups
- Listing Active Groups
- Posting an Article
- Listing New Articles
- Selecting a Group on Which to Operate
- Listing Articles in a Group
- Retrieving an Article Header Only
- Retrieving an Article Body Only
- Reading an Article from a Group
- Changing to NNRP Reader Mode
- Listing Articles in a Group
- Retrieving an Article Body Only
- The active and newsgroups files
- Retrieving an Article Header Only
- Article Batching
- Pushing a News Article onto a Server
- Listing New Articles
- Reading an Article from a Group
- Expiring News Articles
- Cancel an Article