Changi NNTP Server 1.0

[ Bottom of Page | Previous Page | Next Page | Table of Contents ]

CHANX.EXE
News exchanger

Chanx is a passive NNTP client to send news articles to and retrieve from a remote NNTP server. After establishing a connection, it will send locally posted articles to a remote server and retrieve new articles of a specified set of newsgroups that have arrived after a particular time, which usually is the last time it had been invoked.

Chanx features

The next chapters will cover the following topics:


Usage Examples

Chanx offers three different methods to retrieve news from a remote.

Method 1: Retrieving Articles using XOVER

Using XOVER is the preferred method, because it is fast and won't put too much load on the remote server. However, not all servers may support this method, because it's an extension to the NNTP standard. Another disadvantage is, that you won't be able to retrieve the same newsgroups from different servers.

First, you must create a so called watermark file, which includes all groups you want to subscribe to, one newsgroup name per line with a colon on the end. This file must be created in a subdirectory of CHANGIWORKDIR. The name of the subdirectory must equal the name of the remote server's domain. The name of the watermark file itself should equal the remote's hostname without domain, appended with the extension .watermark.

Example:

The fully qualified domain name of the remote host is assumed to be news.ping.de, while CHANGIWORKDIR points to d:\changi. Create a file named d:\changi\ping.de\news.watermark with the following contents:

comp.os.os2.advocacy:
comp.os.os2.mail-news:
Option -mx instructs Chanx to query for new articles with the XOVER command.
chanx -mx news.ping.de
Replace news.ping.de with the fully qualified domain name of your remote newsserver.

After Chanx successfully finishes the session with the remote server, it will update the watermark file by adding the highest article number retrieved. On the next session it will continue with the numbers found in the watermark file.

Remember, that article numbers are assigned to articles by the newsserver and so they will differ from site to site. For example, article 1022 of group alt.hackers on your machine may be article number 2937745 on your provider's site.


Method 2: Retrieving Articles using NEWNEWS

As this is the default method, no specific option must be specified. However, some additional parameters are needed if you connect the remote server for the very first time.
chanx news.logoport.com comp.os.os2*,alt* 961224 000000
This will query the server news.logoport.com for all articles of newsgroups beginning with comp.os.os2 and alt, which had been received by this server since 12/24/96.

After Chanx successfully finishes the session with the remote server, it will store the name of the newsgroups and the time of the last request in a file named news.last in directory logoport.com.

For subsequent connects you simply enter

chanx news.logoport.com
Chanx will only retrieve those articles which have been received by the remote server after the time of your last query.

You are free to edit the news.last file in order to change your list of newsgroups or the date of your last request.

Chanx will never update an existing host.last file with a new list of newsgroups. It will only update the date and time field in this file.

However, if you call Chanx with groups, date and time parameters and the host.last file already exists then Chanx will not update anything, but will treat this session as an out-of-sequence connect. This offers you the opportunity of retrieving a bunch of articles which may have got lost on your site, or retrieving some groups which you don't want to get on a regular basis.

If you want to change the list of groups to be retrieved by default, then you must, first, manually edit host.last and, second, also run Chanco with the newgroup or rmgroup parameter.

The advantage of using NEWNEWS to query new articles is, that you may freely change the remote server and even get the same newsgroups from different servers. Chanx will take care, that you won't retrieve more than a single copy of each article, because new articles are reported and retrieved by message-id rather than by number. The message-id of an article is kept during its whole lifetime, but the article number usually differs from server to server.

However, some servers do not allow to use NEWNEWS, because this command uses too many system resources on the remote site. Unfortunately, more and more newsadmins disable NEWNEWS on their machines.


Method 3: Retrieving Articles by Number

This method sticks with NNTP standards and should be used if both of the previously described methods failed. Unfortunately it's slow.

Like with the XOVER method described above, you must create a watermark file before connecting a remote server for the very first time.

Specify option -mw to enable this most compatible retrieval method.

chanx -mw news.logoport.com

Filtering articles

New articles may be filtered before downloading to decrease the amount of data to be transfered. Depending on the mode used to download new articles, Chanx provides three different methods for article filtering:

  1. Matching header items defined in filter.cf.
  2. Calling a REXX script named OVERFILT.CMD to filter articles by the contents of an overview line.
  3. Calling a REXX script named CXDROP.CMD with all header lines as an argument.

Filter Method 1: Reading filter.cf

If a file named filter.cf is found in CHANGIWORKDIR, Chanx will first retrieve the header or overview line of an article, process the entries of filter.cf against this data and then decide if it should retrieve the complete article.

Using option -ld will store message-ids or article numbers of dropped articles in host.drop.

Filter Method 2: Calling OVERFILT.CMD Macro

If started with option -mx, Chanx will call OVERFILT.CMD for each article, if this macro is found in CHANGIWORKDIR. Two arguments are passed to this REXX macro. The first one is the name of the newsgroup and the second is the overview line itself. If this macro returns 0, Chanx will retrieve the corresponding article. A return value of 1 will drop it.

Use option -ld to store overview lines of dropped articles in host.drop.

Filter Method 3: Calling CXDROP.CMD Macro

This method is similar to method 1, but can't be used when calling Chanx with option -mx.

If a file named CXDROP.CMD is found in CHANGIWORKDIR, then Chanx will first retrieve the header of an article and pass all header lines as arguments to this REXX macro.

If CXDROP.CMD returns 0, Chanx will retrieve the corresponding article. A return value of 1 will drop it.

Calling Chanx with option -ld will store message-ids or article numbers of dropped articles in host.drop.


Cleaning Up

It's a good idea to run Chanco after each run of Chanx with the following parameters, in order to update the server's internal buffers:
Chanco -v flushlogs
Chanco -v oversync normal

[ Top of Page | Previous Page | Next Page | Table of Contents ]


URL: changi/manual/chanx.html
Created: 3 August 1996
Revised: 8 December 1996
Author: harald@os2point.ping.de