emailler/README-nntp65.md

42 lines
3.1 KiB
Markdown
Raw Normal View History

2020-10-29 19:16:25 +00:00
# Apple II Email and Usenet News Suite
<p align="center"><img src="img/emailler-logo.png" alt="emai//er-logo" height="200px"></p>
2020-10-29 20:01:06 +00:00
[Back to Main emai//er Docs](README-emailler.md#detailed-documentation-for-usenet-functions)
2020-10-29 19:16:25 +00:00
## `NNTP65.SYSTEM`
2020-10-29 21:24:24 +00:00
*Run using `Closed Apple`-`R` in `EMAIL.SYSTEM`*
2020-10-29 19:16:25 +00:00
2020-10-30 01:44:09 +00:00
<p align="center"><img src="img/NNTP65.jpg" alt="NNTP65" height="400px"></p>
2020-10-29 22:02:27 +00:00
2020-10-29 23:00:14 +00:00
`NNTP65.SYSTEM` is a Network News Transport Protocol (NNTP) client for the Apple II. It requires an Uthernet-II ethernet card and will not work with other interfaces without modification, because it uses the W5100 hardware TCP/IP stack.
2020-10-30 00:46:05 +00:00
`NNTP65.SYSTEM` handles downloading of news articles. Transmission is handled by [`NNTP65UP.SYSTEM`](README-nntp65up.md).
2020-10-29 23:00:14 +00:00
Before running `NNTP65.SYSTEM` for the first time, be sure you have performed the basic Emai//er setup described [here](README-emailler-setup.md) and have also performed the initialization specific to Usenet discussed in [this page](README-usenet-setup.md). In particular, the `NEWS.SPOOL` directory must have been created, otherwise `NNTP65.SYSTEM` will be unable to download news articles.
`NNTP65.SYSTEM` runs without any user interaction and performs the following tasks:
2020-10-30 00:46:05 +00:00
- Detect Uthernet-II.
- Obtain IP address using DHCP.
- Connect to NNTP server using parameters from first three lines of `NEWS.CFG`. (`AUTHINFO USER` and `AUTHINFO PASS` commands).
2020-10-29 23:00:14 +00:00
- For each newsgroup listed in `NEWSGROUPS.CFG`:
- Issue `GROUP` command to select the newsgroup.
- Parse the respond from the server which indicates the message number of the first and last messages available in the newsgroup.
2020-10-29 23:02:19 +00:00
- If the article number in `NEWSGROUPS.CFG` is zero, set the current article number to the last available article number minus 100 (so that up to 100 articles are retrieved when the newsgroup is retrieved for the first time.) Otherwise, set the current article number to the first article number recorded in `NEWSGROUPS.CFG`.
2020-10-29 23:00:14 +00:00
- Issue the `STAT` command to the NNTP server for the current article number.
- If the article does not exist, increment the current article number and loop to the previous step.
- For each article to be retrieved from the selected newsgroup:
- Issue the `NEXT` command to the NNTP server to advance to the next article.
- Issue to `ARTICLE` command to retrieve the news article, writing it to a file in the `NEWS.SPOOL` directory (eg: `/H1/DOCUMENTS/EMAIL/NEWS.SPOOL/NEWS.1234`).
2020-10-29 23:02:19 +00:00
- Once all articles have been retrieved for this newsgroup, write an updated newsgroup line to the file `NEWSGROUPS.NEW`. This will be identical to the line read from `NEWSGROUPS.CFG` except with the last article number updated.
2020-10-29 23:00:14 +00:00
- Copy the messages just retrieved from the `NEWS.SPOOL` directory to the mailbox for the newsgroup in question.
- Once all newsgroups have been retrieved, rename `NEWSGROUPS.NEW` to replace `NEWSGROUPS.CFG`.
- Issue the `QUIT` command to disconnect from the NNTP server.
2020-10-30 00:46:05 +00:00
- If `NNTP65.SYSTEM` was invoked from `EMAIL.SYSTEM`, load and run `EMAIL.SYSTEM`. Otherwise quit t
o ProDOS.
2020-10-29 23:00:14 +00:00
2020-10-29 20:01:06 +00:00
[Back to Main emai//er Docs](README-emailler.md#detailed-documentation-for-usenet-functions)
2020-10-29 19:16:25 +00:00