Changi NNTP Server 1.0

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

CHANX.EXE
Command Line Options

Simply call the program without any options to get a usage help:
Usage: chanx [options] host [groups YYMMDD HHMMSS [<dist>]]
options:
  -a<user:passwd>  authentication
  -d<debug-flags>  debug switches               (all off)
  -h<remotehost>   remote host to connect       (host)
  -k<size>         stop after <size> kBytes     (unlimited)
  -l<list-flags>   list retrieval flags
  -m<mode-flags>   operation mode flags
  -n<threads>      number of concurrent queries (3)
  -p<port>         port number to connect       (nntp)
  -r<rnewsprogram> rnews program call           (rnews)
  -s<spooldir>     spool directory              (spool)
  -t<minutes>      stop after <minutes> minutes (unlimited)
  -w<seconds>      remote connection timeout    (600)
  -W<seconds>      local connection timeout     (60)

mode flags:                   debug flags:
  b  batch mode                 f  article filtering
  o  omit datefile update       t  nntp telegrams
  p  posting only, no query     p  posting
  q  query only, no posting     o  screen output
  r  send MODE READER         list flags:
  s  send SLAVE                 a  active file
  t  type to console            d  save dropped
  w  without newnews            g  new newsgroups
  x  use xover                  j  distributions
                                n  newsgroup descriptions
                                u  subscriptions

General Command Line Parameters

Note, that you can't use the optional parameters groups, YYMMDD, HHMMSS and dist in conjunction with option -mw or -mx.
host
is the hostname of the remote site. This parameter is required.

groups
is a list of the newsgroups you want to request for new articles. Separate them with a comma. It's highly recommended that you use wildcard expressions to specify the list of newsgroups.

Although the practice is discouraged you may use a full pathname, in host.last, pointing to a newsrc file containing the newsgroups you want to retrieve. This file should contain one newsgroup per line, each followed by a colon. Chanx will ignore anything following the colon and it will not modify or update this file in any way.

YYMMDD HHMMSS
must specify date and time in GMT, not local time. All articles which have arrived at the remote site after this time will be retrieved.

dist
will only query articles with the given distribution. This item is only included for completeness. It may put heavy loads on the server and substantially increase the transfer time.

Command Line Options

Chanx supports a rich set of option, most of which you'd never use, and in most environments Chanx will run fine without specifying any of them. On the other hand, these options offer some interesting features to optimize news exchange or to solve the problems which may arise while you try to retrieve new articles from or upload local posts to your provider's machine.

General Command Line Options

-a user:passwd
This option allows Chanx to connect to remote servers protected with simple AUTHINFO. You must provide your user-ID and your password separated by a colon.

-h remotehost
Normally Chanx will simply connect to the remote server specified by the host item on the command line. But because this item is used for other purposes too (like naming the host.last file, for example), you may alternatively use this option to specify a different hostname to connect to. With this option you may even supply a hostname in the dotted decimal form in case of DNS problems.

-n threads
specifies the number of connections, or threads, to be activated for article retrieval. By default Chanx uses three connections, which should be sufficient for normal modem connections. This parameter is ignored in conjunction with option -mw.

-p port
specifies a different port number. By default Chanx uses the nntp entry in etc\services or port 119 if no entry was found.

-r rnewscall
overrides the default call to Rnews. This option is ignored

-s spooldir
Specifies the spool directory. Chanx will check this directory for waiting posts.

-wseconds
By default Chanx will wait up to 600 seconds for a response from the remote server. This option may be used to set a different timeout.
-Wseconds
This option is similiar to option -w, but is used to change the response timeout for the local server connection, which defaults to 60 seconds.

Mode Options

-mb
(batch mode) will not directly feed retrieved articles into the standard input channel of Rnews but create a temporary file named host.batch. This file is automatically fed to Rnews after all articles had been successfully retrieved.

This option might decrease the connection time while using more diskspace.

-mo
(omit update) will not update host.last. By default Chanx updates this file after retrieving the ids of all new articles from the server.

-mp
(post only) disables the retrieval of new articles.

-mq
(query only) stops Chanx from posting.

-mr
will send MODE READER to the server. This should be used with INN running on the remote site if it needs to be switched from innd to nnrpd in order to talk to passive clients.

-ms
will send a SLAVE command to the server. Some NNTP servers might increase the priority for the current session.

-mt
(type mode) will not directly store retrieved articles into the newsbase but print them on the console instead. This might not only decrease connection time but may also allow further processing. For example you can create a compressed batch file calling

chanx -mt hostname | gzip > batch.Z
and process this file later using
rnews -Fbatch.Z
-mw
This option should be used if the remote server neither supports NEWNEWS nor XOVER. Articles are queried by article number. The chapter about usage examples provides additional informations of available download methods.

-mx
If the remote server doesn't support NEWNEWS or if the admin of the remote machine asks you to reduce the load put on his machine while downloading news, then try this option. Articles are queried by overview lines and article number. See the usage examples for a further discussion of available download methods.


List Retrieval Options

Newsserver implementations like Changi use many files containing different types of lists. One of the central lists is stored in the active file, which may grow very large. If you intend to retrieve many or even all newsgroups available at the remote site, then creating and updating these lists with a text editor easily becomes a big task. Fortunately, Chanx is able to retrieve some of them from the remote site.

Another interesting feature is use of a filter file to reject all articles 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.

-la
queries an active file from the remote host and stores it in host.active.

-ld
saves all filtered articles in host.drop.

-lg
queries a list of newly created newsgroups at the remote site and stores it in host.newgroups. If this file exists then Chanx will append the new groups to this file.

-lj
queries a distribution list and stores it in host.distributions.

-ln
queries a description list of all available newsgroups and stores it in host.newsgroups. This extension to the NNTP protocol may not be available on all servers.

-lu
queries a subscription list and stores it in host.subscriptions. This extension to the NNTP protocol may not be available on all servers.


Limiting News Amount or Connection Time

The intent of these options is to limit the risk of unattended program operation. Without them Chanx will usually keep connected until all articles have been successfully retrieved. Due to the layout of the NNTP protocol and the programs' internal design you can't use these options to define regular connection times or amount of exchanged news.

If any of these limits is reached, Chanx will abort and will not update host.last or host.watermark.

If you plan to run Chanx unattended, you must implement additional safety checks. Never trust a single one on its own.

-k size
sets maximum number of kilobytes of articles to retrieve from the remote host. Chanx will check for this limit before retrieving each article.

-t minutes
sets maximum connection time in minutes. Note that this function will only work as long as the remote host is sending data. Chanx will check for this limit before retrieving each article. Situations in which the server on the remote host stops responding while keeping the connection alive must be handled somewhere else (slip/modem timeout, for example).


Debugging Options

While previous versions created a logfile, this release uses a local syslog daemon for greater flexibility. A syslog daemon is not included in this distribution, but is part of IBM's TCP/IP base product and, in a more enhanced version (ported by Jochen Friedrich), available as freeware.

-df
logs article filtering. Chanx will report problems with the filter file as well as filtering results of each article header processed.

-do
sends log messages to the console. Use this option if you didn't run a local syslog daemon. To redirect this output to a file, append
2>mylog
at the end of the command line.

-dp
forces Chanx to log all actions while trying to find and send local posts to the remote host.

-dt
logs all NNTP telegrams sent to and received from the remote host. This option is very useful if you experience problems after Chanx successfully connected to the remote host.


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


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