PULLNEWS(1) | InterNetNews Documentation | PULLNEWS(1) |
pullnews - Pull news from multiple news servers and feed it to another
pullnews [-BhnOqRx] [-a hashfeed] [-b fraction] [-c config] [-C width] [-d level] [-f fraction] [-F fakehop] [-g groups] [-G newsgroups] [-H headers] [-k checkpt] [-l logfile] [-L size] [-m header_pats] [-M num] [-N timeout] [-p port] [-P hop_limit] [-Q level] [-r file] [-s to-server[:port][_tlsmode]] [-S max-run] [-t retries] [-T connect-pause] [-w num] [-z article-pause] [-Z group-pause] [from-server ...]
The "Net::NNTP" module must be installed. This module is available as part of the libnet distribution and comes with recent versions of Perl. For older versions of Perl, you can download it from <http://www.cpan.org/>.
pullnews reads a config file named pullnews.marks, and connects to the upstream servers given there as a reader client. This file is looked for in pathdb when pullnews is run as the user set in runasuser in inn.conf (which is by default the "news" user); otherwise, this file is looked for in the running user's home directory.
By default, pullnews connects to all servers listed in the configuration file, but you can limit pullnews to specific servers by listing them on the command line: a whitespace-separated list of server names can be specified, like from-server for one of them. For each server it connects to, it pulls over articles and feeds them to the destination server via the IHAVE or POST commands. This means that the system pullnews is run on must have feeding access to the destination news server.
pullnews is designed for very small sites that do not want to bother setting up traditional peering and is not meant for handling large feeds.
In case you have running peers and don't want to propagate them the articles you are pulling from upstream servers, you should add a fake hop with the -F flag to all the pulled articles, and add that very fake hop in the exclusion sub-field of all the sites configured in your newsfeeds file which should not receive these articles. For example, using "pullnews -F myserverimported", change "sitename:*:Tm:innfeed!" to "sitename/myserverimported:*:Tm:innfeed!" for every sitename in newsfeeds you don't want to feed the pulled articles to (like your outgoing peers and a possible "inpaths!" entry). Entries like "ME", "controlchan!", "innfeed!" or "nocem!" do not need that exclusion.
For instance:
pullnews -a 1/2 Feeds about 50% of all articles. pullnews -a 2/2 Feeds the other 50% of all articles.
Another example:
pullnews -a 1-3/10 Feeds about 30% of all articles. pullnews -a 4-5/10 Feeds about 20% of all articles. pullnews -a 6-10/10 Feeds about 50% of all articles.
You can use an extended syntax of the form "value/mod:offset" or "start-end/mod:offset" (using an underscore "_" instead of a colon ":" is also recognized). As MD5 generates a 128-bit return value, it is possible to specify from which byte-offset the 32-bit integer used by hashfeed starts. The default value for "offset" is ":0" and thirteen overlapping values from ":0" to ":12" can be used. Only up to four totally independent values exist: ":0", ":4", ":8" and ":12".
Therefore, it allows generating a second level of deterministic distribution. Indeed, if pullnews feeds "1/2", it can go on splitting thanks to "1-3/9:4" for instance. Up to four levels of deterministic distribution can be used.
The algorithm is compatible with the one used by Diablo 5.1 and up.
See "CONFIG FILE" below for the format of this file.
-m "Hdr1:regexp1 !Hdr2:regexp2 #Hdr3:regexp3 !#Hdr4:regexp4"
specifies that the article will be passed only if the "Hdr1" header field body matches "regexp1" and the "Hdr2" header field body does not match "regexp2". Besides, if the "Hdr3" header field body matches "regexp3", that header is removed; and if the "Hdr4" header field body does not match "regexp4", that header is removed.
The default is to behave like a feeder and use the IHAVE command. (You'll have to allow in incoming.conf the connections from pullnews so that it is recognized as a feeder.)
The connection is by default unencrypted. To negotiate a TLS encryption layer, you can set tlsmode to "TLS" for implicit TLS (negotiated immediately upon connection on a dedicated port) or "STARTTLS" for explicit TLS (the appropriate command will be sent before authenticating or feeding messages). Examples of use are:
pullnews -s news.server.com pullnews -s news.server.com_STARTTLS pullnews -s news.server.com:433_TLS
Note that not all NNTP servers implement TLS for feeding articles.
The config file for pullnews is divided into blocks, one block for each remote server to connect to. A block begins with the host line (which must have no leading whitespace) and contains just the hostname of the remote server with optional port and TLS mode (with the same semantics as the -s flag), optionally followed by authentication details (username and password for that server). Note that authentication details can also be provided for the downstream server (a host line for "localhost" or the hostname specified with the -s flag could be added for it in the configuration file, with no newsgroup to fetch).
Following the host line should be one or more newsgroup lines which start with whitespace followed by the name of a newsgroup to retrieve. Only one newsgroup should be listed on each line.
pullnews will update the config file to include the time the group was last checked and the highest numbered article successfully retrieved and transferred to the destination server. It uses this data to avoid doing duplicate work the next time it runs.
The full syntax is:
<host>[:<port>][_<tlsmode>] [<username> <password>] <group> [<time> <high>] <group> [<time> <high>]
where the <host> line must not have leading whitespace and the <group> lines must.
A typical configuration file would be:
# Format: group date high data.pa.vix.com rec.bicycles.racing 908086612 783 rec.humor.funny 908086613 18 comp.programming.threads nnrp.vix.com pull sekret comp.std.lisp news.server.com:563_TLS joe password news.software.nntp
Note that an earlier run of pullnews has filled in details about the last article downloads from the two rec.* groups. The two comp.* groups and the news.* group were just added by the user and have not yet been checked.
The nnrp.vix.com server requires authentication, and pullnews will use the username "pull" and the password "sekret" (without any encryption layer).
The connection to news.server.com will be encrypted with implicit TLS on port 563. Joe's password won't be sent in plaintext.
pullnews was written by James Brister for INN. The documentation was rewritten in POD by Russ Allbery <eagle@eyrie.org>.
Geraint A. Edwards greatly improved pullnews, adding no more than 16 new recognized flags, fixing some bugs and integrating the backupfeed contrib script by Kai Henningsen, adding again 6 other flags.
incoming.conf(5), rnews(1).
2024-03-31 | INN 2.7.2 |