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.  Instead of using innxbatch, you may
43       consider innfeed, or if that is not possible, nntpsend.
44

OPTIONS

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

EXAMPLES

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

HISTORY

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

SEE ALSO

108       ctlinnd(8), innxmit(8), newsfeeds(5), nntpsend(8), passwd.nntp(5),
109       shlock(1).
110
111
112
113INN 2.6.5                         2022-01-23                      INNXBATCH(8)
Impressum