=head1 NAME pullnews - Pull news from multiple news servers and feed it to another =head1 SYNOPSIS B [B<-hnqRx>] [B<-b> I] [B<-c> I] [B<-C> I] [B<-d> I] [B<-f> I] [B<-F> I] [B<-g> I] [B<-G> I] [B<-H> I] [B<-k> I] [B<-l> I] [B<-m> I] [B<-M> I] [B<-N> I] [B<-p> I] [B<-P> I] [B<-Q> I] [B<-r> I] [B<-s> I[:I]] [B<-S> I] [B<-t> I] [B<-T> I] [B<-w> I] [B<-z> I] [B<-Z> I] [I ...] =head1 REQUIREMENTS The C 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 L. =head1 DESCRIPTION B reads a config file in the running user's home directory (normally called F<~/.pullnews>) and connects to the upstream servers given there as a reader client. By default, it connects to all servers listed in the configuration file, but you can limit B to specific servers by listing them on the command line: a whitespace-separated list of server names can be specified, like I 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 B is run on must have feeding access to the destination news server. B is designed for very small sites that do not want to bother setting up traditional peering and is not meant for handling large feeds. =head1 OPTIONS =over 4 =item B<-b> I Backtrack on server numbering reset. Specify the proportion (C<0.0> to C<1.0>) of a group's articles to pull when the server's article number is less than our high for that group. When I is C<1.0>, pull all the articles on a renumbered server. The default is to do nothing. =item B<-c> I Normally, the config file is stored in F<~/.pullnews> for the user running B. If B<-c> is given, I will be used as the config file instead. This is useful if you're running B as a system user on an automated basis out of cron rather than as an individual user. See L below for the format of this file. =item B<-C> I Use I characters per line for the progress table. The default value is C<50>. =item B<-d> I Set the debugging level to the integer I; more debugging output will be logged as this increases. The default value is C<0>. =item B<-f> I This changes the proportion of articles to get from each group to I and should be in the range C<0.0> to C<1.0> (C<1.0> being the default). =item B<-F> I Prepend I as a host to the Path: header of articles fed. =item B<-g> I Specify a collection of groups to get. I is a list of newsgroups separated by commas (only commas, no spaces). Each group must be defined in the config file, and only the remote hosts that carry those groups will be contacted. Note that this is a simple list of groups, not a wildmat expression, and wildcards are not supported. =item B<-G> I Add the comma-separated list of groups I to each server in the configuration file (see also B<-g> and B<-w>). =item B<-h> Print a usage message and exit. =item B<-H> I Remove these named headers (colon-separated list) from fed articles. =item B<-k> I Checkpoint (save) the config file every I articles (default is C<0>, that is to say at the end of the session). =item B<-l> I Log progress/stats to I (default is C). =item B<-m> I Feed an article based on header matching. The argument is a number of whitespace-separated tuples (each tuple being a colon-separated header and regular expression). For instance: Hdr1:regexp1 !Hdr2:regexp2 specifies that the article will be passed only if the C header matches C and the C header does not match C. =item B<-M> I Specify the maximum number of articles (per group) to process. The default is to process all new articles. See also B<-f>. =item B<-n> Do nothing but read articles S<-- does> not feed articles downstream, writes no B file, does not update the config file. =item B<-N> I Specify the timeout length, as I seconds, when establishing an NNTP connection. =item B<-p> I Connect to the destination news server on a port other than the default of C<119>. This option does not change the port used to connect to the source news servers. =item B<-P> I Restrict feeding an article based on the number of hops it has already made. Count the hops in the Path: header (I), feeding the article only when I is C<+num> and I is more than I; or I is C<-num> and I is less than I. =item B<-q> Print out less status information while running. =item B<-Q> I Set the quietness level (C<-Q 2> is equivalent to C<-q>). The higher this value, the less gets logged. The default is C<0>. =item B<-r> I Rather than feeding the downloaded articles to a destination server, instead create a batch file that can later be fed to a server using B. See rnews(1) for more information about the batch file format. =item B<-R> Be a reader (use MODE READER and POST commands) to the downstream server. The default is to use the IHAVE command. =item B<-s> I[:I] Normally, B will feed the articles it retrieves to the news server running on localhost. To connect to a different host, specify a server with the B<-s> flag. You can also specify the port with this same flag or use B<-p>. =item B<-S> I Specify the maximum time I in seconds for B to run. =item B<-t> I The maximum number (I) of attempts to connect to a server (see also B<-T>). The default is C<0>. =item B<-T> I Pause I seconds between connection retries (see also B<-t>). The default is C<1>. =item B<-w> I Set each group's high watermark (last received article number) to I. If I is negative, calculate S+I> instead (i.e. get the last I articles). Therefore, a I of C<0> will re-get all articles on the server; whereas a I of C<-0> will get no old articles, setting the watermark to I (the most recent article on the server). =item B<-x> If the B<-x> flag is used, an Xref: header is added to any article that lacks one. It can be useful for instance if articles are fed to a news server which has I set in F. =item B<-z> I Sleep I seconds between articles. The default is C<0>. =item B<-Z> I Sleep I seconds between groups. The default is C<0>. =back =head1 CONFIG FILE The config file for B 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, optionally followed by authentication details (username and password for that server). 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. B 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: [ ] [