NNFEEDN
[/?]
[/SKIPHEADER string]]
[/PATHALIAS string]]
[/FROMIP[+|-]]
[/TOIP[+|-]]
[/POST[+|-]]
[/SLAVE[+|-]]
[/READER[+|-]]
[/IGNORE436[+|-]]
[/IGNORE441[+|-]]
[/BROKENSTAT[+|-]]
[/BROKENNEWNEWS[+|-]]
[/ADDSTAMP[+|-]]
[/SRV_SUPERDOMAINS[+|-]]
[/SRV_SELF[+|-]]
[/IMPLICIT[+|-]]
[/IP6ADDR[+|-]]
from
to
timestampfile
groups
The NNFEEDN command feeds news articles from the source NNTP server at
from to the target NNTP server at to using the
NEWNEWS command to obtain the list of new articles at the
source that have arrived since a particular timestamp. Neither server
need be local. NNFEEDN can be used to feed articles between any two
arbitrary NNTP servers.
Note:
The NEWNEWS command requires a lot of processing on the
source server, to handle the wildcard selection and the datestamp checks,
and for that reason it has become widespread practice on the part of NNTP
server administrators to disable support for the NEWNEWS
command except for known, privileged, clients.
The timestamp used in the NEWNEWS command is the last
modified timestamp of the timestampfile file. (The actual file
content is ignored.) NNFEEDN uses this file to record the last time that
it asked for news articles, so that the next time that it runs it asks for
news articles that have arrived since the last time that it asked. One
can therefore modify the timestamp with tools such as TOUCH from
the OS/2 Command Line Utilities version 2.2.
NNFEEDN locates servers from the from and to strings
supplied in
the normal way,
using nntp as the service name, tcp as the
transport name, and 119 as the well-known port number.
NNFEEDN prevents multiple concurrent instances of itself from using the same timestamp file, which would result in confusion, by opening the file for write access, denying write access to all others, and holding it open whilst it is running.
If the timestamp file does not exist, NNFEEDN creates it and uses the time exactly 12 months prior to the current time as the timestamp. Therefore, an easy way to set the timestamp back, to retrieve old news that does not exist on the target server, is to delete the timestamp file.
Like all file timestamps, this timestamp is in UTC not in the local
timezone. The timestamp is the time at the source server. If the source
server supports the DATE command, NNFEEDN uses it to
determine what the time at the source server is at the point that it asks
for new articles. If the source server does not support the
DATE command, NNFEEDN has no choice but to assume that the
source server and the machine on which NNFEEDN is running have
synchronised clocks. If this is not the case articles may be
skipped as a consequence.
groups is the list of groups used in the NEWNEWS
command. This list is a comma-separated list of simple NNTP wildcard
specifications (where the asterisk, '*', matches zero or more characters).
NNFEEDN relies upon no NNTP commands that are not listed in RFC 977. It
requires the source server to support the NEWNEWS command and
the ARTICLE command selecting by Message-ID. It requires the
target server to support the STAT command selecting by
Message-ID, the POST command, and the IHAVE
command.
NNFEEDN may also send the DATE and SLAVE
commands to the source server and the SLAVE command to the
target server, but does not require that either server support those
commands.
NNFEEDN attempts to reduce the bandwidth that it uses. It does this by
checking, with the STAT command, whether the target server
already has an article before it retrieves the entire article
header and body from the source server. (Other NNTP news exchanger
softwares rely on the IHAVE command alone to determine
whether the target server already has the article. The nature of
IHAVE requires that they obtain the entire article headers
and body from the source server first, even if the target server already
has the article.)
In order to allow the passage of a news article to be traced, NNFEEDN
prepends a Received: header to each article that it
transfers, describing its receipt of the article from the source server.
(It is presumed that the target server will add a header describing the
receipt of the article in turn from NNFEEDN.)
To assist in tracing the passage of news articles NNFEEDN includes the message IDs of all articles that it transfers in its log output.
Some egregiously broken NNTP server softwares (e.g. Lyris
ListManager) violate RFC 977 and do not support the ARTICLE
command selecting by Message-ID when a group has not been previously
selected. NNFEEDN cannot be used to pull articles from such servers,
since it does not operate in terms of groups at all. Such server
softwares are broken, and should be replaced.
Some broken NNTP server softwares violate RFC 977 and do not correctly
implement the STAT command selecting an article by its ID,
issuing such false errors as "421 Not in a newsgroup". (Step forward,
once again, Lyris ListManager.) NNFEEDN relies upon this to prevent
wasting time and bandwidth attempting to transfer articles that the target
already has.
To cope with such broken NNTP server softwares, use the
/BROKENSTAT option, which will cause NNFEEDN to treat a 421
response to STAT as if it were a 430 response. This will
slow the operation of NNFEEDN down markedly as it retrives from the source
and then tries to re-send to the target articles that are already present
on the target.
Some badly designed NNTP server softwares complain and reject articles if
they see Received: headers in articles, despite the clear
injunction in RFC 1036 that any valid RFC 822 header should be allowed in
an article. The stamping of articles with Received: headers
must be turned off, with /ADDSTAMP-, if the target server is
running such a software.
Even though RFC 3977 strongly encourages the use of four-digit year
numbers in the NEWNEWS command, and mandates that NNTP
servers recognize the command in four-digit year form, some broken NNTP
server softwares still contain a century bug and only recognize two-digit
years. This is despite it having been several years since that bug first
manifested itself.
NNFEEDN sends four-digit years by default, in line with the recommendation
in RFC 3977 for NNTP clients. It can be configured to send two-digit
years, for broken NNTP servers that don't recognize four-digit years as
valid, with the /BROKENNEWNEWS+ option.
This is a RUN file invoking NNFEEDN that is suitable to be scheduled by RUNWHEN from the OS/2 Command Line Utilities version 2.2. It feeds new news in the OpenWatcom newsgroups from the OpenWatcom NNTP server to the local host's NNTP server, using a timestamp file that has an unique name for this source and target pair.
setenv SOURCE news.openwatcom.org. setenv TARGET localhost. setenv GROUPS openwatcom.* program %APPS%\JdeBP\IU\bin\NNFeedN.exe argument NNFeedN argument %SOURCE% argument %TARGET% argument %TARGET%\%SOURCE%\NewNews argument %GROUPS%
This command feeds new news in the Borland newsgroups from the InPrise NNTP server to the local host's NNTP server, again using a timestamp file named "NewNews" in the current directory:
[c:\]nnfeedn forums.inprise.com. localhost. NewNews borland.public.*
/V/SKIPHEADER/PATHALIASPath: header.
/IGNORE436/IGNORE441/BROKENSTAT/BROKENNEWNEWS/ADDSTAMPRecieved: header to the top of each article
transferred. This is enabled by default.
/FROMIP/TOIP/POSTPOST command rather than the IHAVE command.
/SLAVESLAVE command to both source and target.
Note: This command has no effect on many modern NNTP server softwares.
/READERMODE READER command to both source and target.
Note: This command has no effect on many modern NNTP server softwares.