Changi NNTP Server 1.0

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

filter.cf

The file filter.cf must be created in the Changi working directory, specified by the CHANGIWORKDIR environment variable.

The filter file should contain one entry per line.

Lines starting with...
...spaceor #are ignored.
...G are interpreted as GET commands.
...D are interpreted as DROP commands.

Lines with GET and DROP commands must follow this syntax:

D|G:[expire]/[newsgroups]/[header]:pattern
The fields newsgroups, header and pattern may contain wildcard expressions.
expire
contains an optional expiration date of this entry. This part is not currently supported but reserved for future use. If the entry expires, the line will be commented.

newsgroups
defines an optional list of newsgroups, for which this line is valid. Wildcards may be used, several newsgroups must be separated by commas. If no newsgroup is specified, * is assumed.
header
is optional and specifies the name of a headerline. If not given, all headerlines will be searched.

pattern
This string may contain wildcards and specifies the pattern to be searched in the given headerlines of the given newsgroups. However, if Lines has been given in the header field, Chanx will numerically compare the number of lines.
After Chanx retrieved an article header, it will sequentially walk through filter.cf to find out whether to drop or to get the body of that article. Because of the sequential processing, later entries in filter.cf may override previous ones.

Examples:

In the first example we want to retrieve only those articles of all groups, which contain the word changi in the subject line.

D://:*
G://Subject:*Changi*
The first line will drop all articles. This is needed because initially Chanx would retrieve any article.

The second line overrides the drop for those articles which contain the word Changi in the subject. Note that strings are not case-sensitive.

In the second example we want to avoid downloading of articles posted to more than five groups or containing more than 50 lines:

D://Newsgroups:*,*,*,*,*,*
D://Lines:50
This first line will instruct Chanx to drop articles with more than four commas in the newsgroup line, while the second line will drop articles containing more than 50 lines in the article's body.


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


URL: changi/manual/filter.html
Created: 3 August 1996
Revised: 21 November 1996
Author: harald@os2point.ping.de