Changi NNTP Server 1.2

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

CHANX.EXE
Article Filters

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.
REXX is currently not supported with the Windows NT version of Changi.

Another interesting feature is the use of a filter file to reject every article and let Chanx write header information into a file named host.drop. Later, another program may transfer selected articles to a file named host.iwant. If Chanx detects an existing iwant file, it will first try to retrieve the articles listed in this file before querying new articles. The bad news is that you have to write your own program to transfer selected lines from host.drop to host.iwant.

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.

You may use a different filter file name by setting CHANXFILTERFILE.

Please refer to filter.cf for the required layout of the filter file. This chapter will also show some samples.

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

If you run Chanx with option -mx, then the program will filter articles based on the overview line. In this mode, only the following header lines are available for filtering:

Subject
From
Date
Message-ID
References
Bytes
Lines
XRef
Some servers may not even include the XRef header in their overview lines sent to Chanx.

Filter Method 2: Calling OVERFILT.CMD Macro

This method is only supported with the OS/2 version of Changi.

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.

To define a different macro name, set 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. It is only supported with the OS/2 version of Changi.

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.

To define a different macro name, set option -ld will store message-ids or article numbers of dropped articles in host.drop.


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


URL: changi/manual/chanxflt.html
Created: 23 March 1997
Revised: 23 March 1997
Author: harald@os2point.ping.de