chiark / gitweb /
Commit 2.4.5-5 as unpacked
[innduct.git] / doc / man / innxbatch.8
1 .TH INNXBATCH 8
2 .SH NAME
3 innxbatch \- send xbatched Usenet articles to a remote NNTP server
4 .SH SYNOPSIS
5 .I innxbatch
6 [
7 .B \-D
8 ]
9 [
10 .BI \-t " timeout"
11 ]
12 [
13 .BI \-T " timeout"
14 ]
15 [
16 .B \-v
17 ]
18 .I host
19 .I file ...
20 .SH DESCRIPTION
21 .I Innxbatch
22 connects to the NNTP server at the specified
23 .I host
24 and sends it the specified xbatch files, using the XBATCH extension to
25 the NNTP protocol. It is normally invoked by a script run out of
26 .IR cron (8)
27 that uses
28 .IR shlock (1)
29 to lock the host name, followed by a
30 .IR ctlinnd (8)
31 command to flush the batchfile.
32 .PP
33 Each file is removed after it has been successfully transferred.
34 .PP
35 If a communication error such as a
36 .IR write (2)
37 failure, or an unexpected reply from the remote server occurs,
38 .I innxbatch
39 will stop sending and leave all remaining files untouched for later retry.
40
41
42 .SH OPTIONS
43 .TP
44 .B \-t seconds
45 .I Innxbatch
46 normally blocks until the connection is made.
47 To specify a timeout on how long to try to make the connection, use
48 the ``\-t'' flag.
49 .TP
50 .B \-T seconds
51 To specify the total amount of time that should be allowed for article
52 transfers, use the ``\-T'' flag.
53 .br
54 The default is to wait until an I/O error occurs, or all the articles have
55 been transferred. If the ``\-T'' flag is used, the time is checked
56 just before each article is started; it will not abort a transfer that
57 is in progress.
58 .TP
59 .B \-v
60 Upon exit,
61 .I innxbatch
62 reports transfer and CPU usage statistics via
63 .IR syslog (3).
64 If the ``\-v'' flag is used, they will also be printed on the standard
65 output.
66 .TP
67 .B \-D
68 Use the ``\-D'' flag to print debugging information on standard error.
69 This will show the protocol transactions between
70 .I innxbatch
71 and the NNTP server on the remote host.
72 .SH EXAMPLES
73 A sample
74 .I newsfeeds(5)
75 entry to produce appropriate xbatch files (thanks to Karsten Leipold
76 <poldi@dfn.de>):
77 .sp 1
78 .nf
79   nase\e
80     :*\e
81     :Tc,Wnb\e
82 .ds R$ <pathbin in inn.conf>
83     :\*(R$/batcher \e
84 .ds R$ <$ac_cv_path_COMPRESS in config.cache>
85 .ds P$ <pathoutgoing in inn.conf>
86        -p "(\*(R$ >\e
87        \*(P$/nase.\e$\e$)" \e
88        nase.do.main
89 .fi
90 .sp 1
91 A sample script to invoke
92 .I innxbatch(8)
93 is:
94 .sp 1
95 .nf
96   #!/bin/sh
97   ##  SH script to send xbatches for a site, wrapped around innxbatch
98   ##  Invocation:
99   ##     sendxbatches.sh <sitename> <hostname> <xbatch file name> ...
100
101   if [ $# -le 3 ]
102   then
103         echo "usage: $0 <sitename> <hostname> <xbatch file name>"
104         exit 1
105   fi
106
107   . <pathbin in inn.conf>/innshellvars
108
109   site="$1"; host="$2"; shift; shift
110
111   ctlinnd flush "$site" \e
112   && sleep 5 \e
113   && exec $NEWSBIN/innxbatch -v -D "$host" $*
114 .fi
115 .SH HISTORY
116 Written by Stefan Petri <petri@ibr.cs.tu-bs.de>, modelled after
117 .IR innxmit (8)
118 and the XBATCH patch for the nntp reference implementation.
119 .SH "SEE ALSO"
120 ctlinnd(8),
121 inn.conf(5),
122 innd(8),
123 innxmit(8),
124 newsfeeds(5),
125 nntpsend(8),
126 shlock(1).