4 Setting Up News As An NNTP Client Only

4.3 Setting up optional configuration files

The files described here are used to configure optional functions of News; none of them are required for a basic NNTP client setup.

4.3.1 Editing the News.Aliases file

News uses this file when processing the newsgroup names in the headers of incoming items. If a newsgroup name with an entry in this file is found in the header, it is replaced with the newsgroup name(s) specified in the entry. Note that all such changes are passed on to downstream sites as well. Entries in this file have the format:
newsgroup_name replacement_list

newsgroup_name -- the name of the newsgroup to which this entry applies. Newsgroup_name cannot contain whitespace. It is separated from replacement_list by any amount of whitespace. In order for replacement_list to be substituted into an item's Newsgroups: header, a newsgroup name in the header must exactly match newsgroup_name. Comparison is case-insensitive.

replacement_list -- a list of newsgroup names, separated by commas, which replaces newsgroup_name in the Newsgroups: header of the item. Replacement_list cannot contain any whitespace. It may be continued across line breaks by specifying the character '\' as the last character on a line.

All characters following the character '#' up to the end of the line are ignored.

Each newsgroup in the item's original Newsgroups: header is matched against every entry in News.Aliases, but the matching is not recursive (i.e. newsgroup names substituted into the header are not then matched against News.Aliases). Mapping of newsgroup names to their aliases is performed before other configuration files which direct actions based on newsgroup names are consulted.

If you need to remap newsgroup names in this fashion, you may set up this file in one of two ways. If you choose, you may edit the template file provided in the News_Dist ZIP file, and place the edited copy in News_Manager. You may also add, remove, or display entries in this file using the commands Add Alias, Delete Alias, and Show Alias, respectively, from within News; the file will be created when you use Add Alias for the first time. Modifying the alias file from within News causes all comments within the file to be lost.

4.3.2 Creating the News.Classes file

In additional to the automatic classes $net and $local, News can create and populate newsgroup classes on a system-wide basis, based on the contents of the file News_Manager:News.Classes. These classes cannot be modified from within News. Entries in this file should be in the following format:
class_name newsgroup_list

class_name -- the name of the class to be created. If class_name does not begin with the character '$', which designates an unmodifiable class, then a '$' will be prepended to class_name to form the name of the actual class created. The class names '$net' and '$local' are reserved for automatic classes created by News, and entries specifying either of these names will be ignored. Class_name cannot contain whitespace, and is separated from newsgroup_list by any amount of whitespace.

newsgroup_list -- a list of newsgroup patterns which specify the newsgroups to be added to the class. Within each pattern, the character '*' is a wildcard which matches any number of characters, while the characters '%' and '?' are wildcards which match any single character. Patterns in newsgroup_list may be separated by a comma or whitespace.

An entry can be continued across multiple lines by ending each line but the last with the character '\'. All text between the character '#' and the end of the entry is ignored.
If you wish to have certain newsgroups entered into specific classes by default, you should create this file yourself. For instance, a simple News.Classes file might say

fun_groups  rec.*,talk.*
science     bionet.*,sci.*
bargains    *.forsale
vms_stuff   comp.org.decus,comp.os.vms,vmsnet.*

4.3.3 Editing the News.Distributions file

This file contains a list of distribution keywords accepted by News, along with brief descriptions, in the following format:

keyword description

keyword -- the keyword which would appear in the Distribution: header of an article posted to the distribution described by this entry.

distribution -- a one-line description of the scope of the distribution denoted by the presence of keyword in the Distribution: header of an article. Note that this is just for information; the functional interpretation of keywords in Distribution: headers is via the distributions and subscriptions fields of entries in News.Sys.

When a user running News.Exe posts an item, all keywords specified in the Distribution: header must have entries in this file. If this file does not exist, then any keyword is considered acceptable.

You should edit the template file provided in the News_Dist ZIP file to reflect the distributions you accept and place the edited file in News_Manager.

4.3.4 Editing the News_Address.Cnf file

News_Address.Cnf contains a series of rewrite rules used by News to rewrite mail addresses for outgoing items. This allows you to transparently route mail to different sites by different mechanisms, or to specify a foreign mail transport without requiring users to type the prefix with every address. Entries in this file have the format

address_pattern rewrite_rule

address_pattern -- a text pattern which is matched against the mail address to be rewritten. The '*' character is a wildcard which matches any number of characters in the address, while the '?' is a wildcard which matches any one character in the address. (Note that unlike similar patterns in other News configuration files, the '%' character is a literal, not a wildcard, since it often appears in mail addresses.) The '_' character is ignored in address_pattern. Address_pattern may not contain any white space. It is separated from rewrite_rule by any amount of white space (excluding line breaks).

rewrite_rule -- a text pattern specifying how the address is to be rewritten, if it matches the pattern specified in address_pattern. Characters are copied directly from the rewrite rule into the rewritten address, except that each time the string '\n', where n is an octal number < 24 (octal), is encountered, the string from the original address which matched the nth '*' wildcard in address_pattern is substituted into the rewritten address. For example, for the following entry
IN%*@*.decnet.myuniv.edu \002::\001
the address 'IN%aeneas@virgil.decnet.myuniv.edu' would match the address_pattern, with the string 'aeneas' matching the first '*', and the string 'virgil' matching the second '*'. According to rewrite_rule, then, this address would be rewritten as 'virgil::aeneas'.

Any text following a '#' character, up to the end of the line, is ignored.

Entries are searched in the order encountered in the file, and the search stops with the first entry which matches the address to be rewritten. An address is converted to lower case before being rewritten. In the rewritten address, case is preserved for characters copied from the rewrite_rule pattern, but characters substituted from the original address are in lower case. Finally, note that only addresses seen by News are rewritten; addresses indirectly passed to VMS Mail (e.g. by specifying a distribution file at the To: prompt) are not.

Read the comments in the version of this file distributed in the News_Dist ZIP file, and, if you decide it would be useful to you, edit it and place the edited copy in News_Manager. If this file does not exist in News_Manager, then News uses the following default rewrite rules:

4.3.5 Editing the News_Post.CC file

News_Post.CC contains entries in which newsgroup names are paired with mail addresses, so that when an item is posted to the newsgroup, a copy is also mailed to the address specified. Note that the posting also goes out via the normal mechanism specified for the newsgroup, so using this file is not equivalent to using the /MailList qualifier when creating a newsgroup. Entries in this file have the following format:

newsgroup_pattern address_list

newsgroup_pattern -- a pattern matched against the newsgroup names in the Newsgroups: header of the item. The character '*' is a wildcard matching any number of characters, and the characters '%' and '?' are wildcards matching any one character. The pattern may not contain any whitespace. Comparison is case-insensitive.

address_list -- a list of mail addresses to which a copy of the item is forwarded, when a newsgroup name in the Newsgroups: header matches newsgroup_pattern. The list is converted to lower case. It is separated from newsgroup_pattern by any amount of whitespace, and may contain whitespace within the list (though multiple spaces will be compressed to a single space when the list is used), but it may not cross a line boundary.

All text between a '#' character and the end of the line is ignored. Each newsgroup name in the item's Newsgroups: header is matched against every entry in this file.

In order to use this capability, edit the template file provided in the News_Dist ZIP file, and place the edited copy in News_Manager.

4.3.6 Editing the News_Post.Defaults file

This file is used to supply default values for the Distribution: and Followup-To: headers for items posted to certain newsgroups. This allows you to direct followups and limit distribution of posts to certain newsgroups automatically. The format of entries in this file is:
newsgroup_pattern
header_keyword default_words
[header_keyword default_words

newsgroup_pattern -- a pattern matched against the newsgroup names in the Newsgroups: header of the item. The character '*' is a wildcard matching any number of characters, and the characters '%' and '?' are wildcards matching any one character. Comparison is case-insensitive. When the matching is performed, a '*' is appended to the beginning and the end of newsgroup_pattern. If newsgroup_pattern is the keyword 'default', it matches any newsgroup name. Newsgroup_pattern must begin in column 1.

header_keyword -- the name of the header for which defaults follow. Two keywords are recognized: 'distribution:' and 'followup-to:'. Recognition is case-insensitive. The line(s) containing header_keyword must begin with whitespace.

default_words -- a comma-separated list of default values to be added to the header specified by header_keyword of any item containing a newsgroup in its Newsgroups: header which matches newsgroup_pattern. The text of default_words is converted to lowercase and added to the words entered into the header in question by the user. If a word is already present in the item header, it is not duplicated.

All text between a '#' character and the end of the line is ignored. Each newsgroup name in the item's Newsgroups: header is matched against every entry in this file.
If you find this useful, edit the template file provided in the News_Dist ZIP file, and place the edited copy in News_Manager.

previous: 4.2.20 News_Usage_Log (optional)
next: 4.4 Installing News.Exe
Table of Contents