1INNXBATCH(8)              InterNetNews Documentation              INNXBATCH(8)
2
3
4

NAME

6       innxbatch, sendxbatches - Send xbatched Usenet articles to a remote
7       NNTP server
8

SYNOPSIS

10       innxbatch [-Dv] [-t timeout] [-T timeout] host file [file ...]
11
12       innxbatch -i [-Dv] [-t timeout] [-T timeout] host
13
14       sendxbatches sitename host file [file ...]
15

DESCRIPTION

17       innxbatch connects to port 119 of the NNTP server at the specified
18       host, and sends it the specified xbatch files, using the XBATCH
19       extension to the NNTP protocol.  These files are specified either from
20       the command line or from standard input if i is used.
21
22       Each file is removed after it has been successfully transferred.
23
24       If a communication error such as a write(2) failure, or an unexpected
25       reply from the remote server occurs, innxbatch will stop sending and
26       leave all remaining files untouched for later retry.
27
28       If authentication credentials are present for the remote server in the
29       passwd.nntp file in pathetc, then innxbatch will use them to
30       authenticate.
31
32       innxbatch does not use itself any file locking.  At worst, a batch
33       could be transmitted twice in parallel by two independent invocations
34       of innxbatch.  To prevent this, it should be invoked by a script run
35       out of cron(8) that uses shlock(1) to lock the host name, followed by a
36       "ctlinnd flush" command to flush the batch file.  sendxbatches is such
37       a wrapper around innxbatch.  It will ensure only one instance is run,
38       flush sitename (as used in the newsfeeds entry) and send to host the
39       files given as arguments.
40
41       As the XBATCH extension is not a standardized NNTP command, some news
42       servers do not recognize it.  Moreover, to accept batches from remote
43       peers via XBATCH, you have to explicitly enable the capability with the
44       xbatch setting in incoming.conf.  Instead of using innxbatch, you may
45       consider innfeed, or if that is not possible, nntpsend.
46

OPTIONS

48       -D  Prints debugging information on standard error.  This will show the
49           protocol transactions between innxbatch and the NNTP server on the
50           remote host.
51
52       -i  Reads batch file names from standard input.  For each successfully
53           transmitted batch, an "OK" is printed on stdout to indicate that
54           another file name is expected.
55
56       -t timeout
57           Specifies a timeout in seconds on how long to try to make the
58           connection.  Otherwise, innxbatch normally blocks until the
59           connection is made.
60
61       -T timeout
62           Specifies the total amount of time in seconds that should be
63           allowed for article transfers.
64
65           The default is to wait until an I/O error occurs, or all the
66           articles have been transferred.  If this flag is used, the time is
67           checked just before each article is started; it will not abort a
68           transfer that is in progress.
69
70       -v  Upon exit, innxbatch reports transfer and CPU usage statistics via
71           syslog(3).  If this flag is used, they will also be printed on the
72           standard output.
73

EXAMPLES

75       A sample newsfeeds entry to produce appropriate xbatch files is:
76
77           nase\
78               :*\
79               :Tc,Wnb\
80               :<pathbin>/batcher -p "(<$COMPRESS in <pathlib>/innshellvars>\
81                   > <pathoutgoing>/nase.\$\$)" nase.do.main
82
83       A sample script to invoke innxbatch(8) is:
84
85           #! /bin/sh
86           #  Send xbatches for a site, wrapped around innxbatch.
87           if [ $# -lt 3 ]
88           then
89               echo "usage: $0 <sitename> <hostname> <xbatch file name> ..."
90               exit 1
91           fi
92           . <pathlib>/innshellvars
93           site="$1"; host="$2"; shift; shift
94           ctlinnd flush "$site" \
95           && sleep 5 \
96           && exec ${NEWSBIN}/innxbatch -v -D "$host" $*
97
98       You can use sendxbatches, already shipped with INN, doing locking.  An
99       example of call is:
100
101           sendxbatches nase remote.news.server.name <pathoutgoing>/nase*
102

HISTORY

104       Written by Stefan Petri <petri@ibr.cs.tu-bs.de>, modelled after innxmit
105       and the XBATCH patch for the NNTP reference implementation.  Examples
106       from Karsten Leipold <poldi@dfn.de>.  Rewritten into POD by Julien
107       Elie.
108

SEE ALSO

110       ctlinnd(8), incoming.conf(5), innxmit(8), newsfeeds(5), nntpsend(8),
111       passwd.nntp(5), shlock(1).
112
113
114
115INN 2.7.0                         2022-07-10                      INNXBATCH(8)
Impressum