1=head1 NAME
2
3nntpsend - Send Usenet articles to remote sites
4
5=head1 SYNOPSIS
6
7B<nntpsend> [B<-acDdlNnpr>] [B<-P> I<portnum>] [B<-s> I<size>]
8[B<-T> I<timelimit>] [B<-t> I<timeout>] [B<-w> I<delay>]
9[I<sitename> I<fqdn>] ...
10
11=head1 DESCRIPTION
12
13B<nntpsend> is a front-end that invokes B<innxmit> to send Usenet articles
14to a remote NNTP site.  The sites to be fed may be specified by giving
15I<sitename> I<fqdn> pairs on the command line.  If no such pairs are given,
16B<nntpsend> defaults to the information given in the F<nntpsend.ctl>
17config file.  The I<sitename> should be the name of the site as specified
18in the F<newsfeeds> file.  The I<fqdn> should be the hostname or IP address
19of the remote site.  An B<innxmit> is launched for sites with queued news.
20All B<innxmit> processes are spawned in the background and the script
21waits for them all to finish before returning.  Output is sent to the file
22F<nntpsend.log> in I<pathlog>.  In order to keep from overwhelming the
23local system, B<nntpsend> waits five seconds before spawning each child.
24
25B<nntpsend> expects that the batch file for a site is named I<sitename>
26in I<pathoutgoing>.  To prevent batch files corruption, B<shlock> is used to
27"lock" these files.  When I<sitename> I<fqdn> pairs are given on the command
28line, any flags given on the command completely describe how B<innxmit>
29and B<shrinkfile> operate.  When no such pairs are given on the command
30line, then the information found in F<nntpsend.ctl> becomes the default
31flags for that site.  Any flags given on the command line override the
32default flags for the site.
33
34An alternative to B<nntpsend> can be B<innduct>, mentioned in the
35innfeed(8) man page.
36
37=head1 OPTIONS
38
39=over 2
40
41=item B<-D>, B<-d>
42
43The B<-D> flag causes B<nntpsend> to send output to stdout rather than
44the log file F<nntpsend.log> in I<pathlog>.  The B<-d> flag does the same
45and it passes B<-d> to all B<innxmit> invocations, which in turn causes
46B<innxmit> to go into debug mode.
47
48=item B<-n>
49
50If the B<-n> flag is used, then B<nntpsend> does not use B<shlock> to lock
51the use of B<nntpsend>.  Batch files will still be locked.
52
53=item B<-s> I<size>
54
55If the B<-s> flag is used, then B<shrinkfile> will be invoked to perform
56a head truncation of I<size> bytes on the batch file and the flag will be
57passed to it.
58
59=item B<-w> I<delay>
60
61If the B<-w> flag is used, then B<nntpsend> waits for I<delay> seconds
62after flushing the site before launching B<innxmit>.
63
64=item B<-a>, B<-c>, B<-l>, B<-N>, B<-P> I<portnum>, B<-p>, B<-r>, B<-T>
65I<timelimit>, B<-t> I<timeout>
66
67The B<-a>, B<-c>, B<-l>, B<-P> I<portnum>, B<-p>, B<-r>, B<-T> I<timelimit>
68and B<-t> I<timeout> flags are passed on to the child B<innxmit> program.
69The B<-N> flag is passed as B<-s> flag to the child B<innxmit> program.
70See innxmit(8) for more details.
71
72Note that if the B<-p> flag is used, then no connection is made and no
73articles are fed to the remote site.  It is useful to have cron(8) invoke
74B<nntpsend> with this flag in case a site cannot be reached for an extended
75period of time.
76
77=back
78
79=head1 EXAMPLES
80
81With the following F<nntpsend.ctl> config file:
82
83    nsavax:erehwon.nsavax.gov::-t60
84    group70:group70.org::
85    walldrug:walldrug.com:4m-1m:-T1800 -t300
86    kremvax:kremvax.cis:2m:
87
88the command C<nntpsend> will result in the following:
89
90    Sitename        Truncation      innxmit flags
91    nsavax          (none)          -a -t60
92    group70         (none)          -a -t180
93    walldrug        1m if >4m       -T1800 -t300
94    kremvax         2m              -t180
95
96The command C<nntpsend -d -T1200> will result in the following:
97
98    Sitename        Truncation      innxmit flags
99    nsavax          (none)          -a -d -T1200 -t60
100    group70         (none)          -a -d -T1200 -t180
101    walldrug        1m if >4m       -d -T1200 -t300
102    kremvax         2m              -d -T1200 -t180
103
104The command C<nntpsend -s 5m -T1200 nsavax erehwon.nsavax.gov group70
105group70.org> will result in the following:
106
107    Sitename        Truncation      innxmit flags
108    nsavax          5m              -T1200 -t180
109    group70         5m              -T1200 -t180
110
111Remember that B<-a> is always given when there is no size limit, and B<-t>
112defaults to C<180>.
113
114=head1 HISTORY
115
116Written by Landon Curt Noll <chongo@toad.com> and Rich $alz
117<rsalz@uunet.uu.net> for InterNetNews.  Converted to POD by Julien Elie.
118
119=head1 SEE ALSO
120
121inn.conf(5), innxmit(1), newsfeeds(5), nntpsend.ctl(5), shlock(1),
122shrinkfile(1).
123
124=cut
125