|
NAMEinnxbatch, sendxbatches - Send xbatched Usenet articles to a remote NNTP serverSYNOPSISinnxbatch [-Dv] [-t timeout] [-T timeout] host file [file ...]innxbatch -i [-Dv] [-t timeout] [-T timeout] host sendxbatches sitename host file [file ...] DESCRIPTIONinnxbatch connects to port 119 of the NNTP server at the specified host, and sends it the specified xbatch files, using the XBATCH extension to the NNTP protocol. These files are specified either from the command line or from standard input if i is used.Each file is removed after it has been successfully transferred. If a communication error such as a write(2) failure, or an unexpected reply from the remote server occurs, innxbatch will stop sending and leave all remaining files untouched for later retry. If authentication credentials are present for the remote server in the passwd.nntp file in pathetc, then innxbatch will use them to authenticate. innxbatch does not use itself any file locking. At worst, a batch could be transmitted twice in parallel by two independent invocations of innxbatch. To prevent this, it should be invoked by a script run out of cron(8) that uses shlock(1) to lock the host name, followed by a "ctlinnd flush" command to flush the batch file. sendxbatches is such a wrapper around innxbatch. It will ensure only one instance is run, flush sitename (as used in the newsfeeds entry) and send to host the files given as arguments. As the XBATCH extension is not a standardized NNTP command, some news servers do not recognize it. Moreover, to accept batches from remote peers via XBATCH, you have to explicitly enable the capability with the noxbatch setting in incoming.conf. Instead of using innxbatch, you may consider innfeed, or if that is not possible, nntpsend. OPTIONS
EXAMPLESA sample newsfeeds entry to produce appropriate xbatch files is:nase\ :*\ :Tc,Wnb\ :<pathbin>/batcher -p "(<$COMPRESS in <pathlib>/innshellvars>\ > <pathoutgoing>/nase.\$\$)" nase.do.main A sample script to invoke innxbatch(8) is: #! /bin/sh # Send xbatches for a site, wrapped around innxbatch. if [ $# -lt 3 ] then echo "usage: $0 <sitename> <hostname> <xbatch file name> ..." exit 1 fi . <pathlib>/innshellvars site="$1"; host="$2"; shift; shift ctlinnd flush "$site" \ && sleep 5 \ && exec ${NEWSBIN}/innxbatch -v -D "$host" $* You can use sendxbatches, already shipped with INN, doing locking. An example of call is: sendxbatches nase remote.news.server.name <pathoutgoing>/nase* HISTORYWritten by Stefan Petri <petri@ibr.cs.tu-bs.de>, modelled after innxmit and the XBATCH patch for the NNTP reference implementation. Examples from Karsten Leipold <poldi@dfn.de>. Rewritten into POD by Julien Elie.SEE ALSOctlinnd(8), incoming.conf(5), innxmit(8), newsfeeds(5), nntpsend(8), passwd.nntp(5), shlock(1).
Visit the GSP FreeBSD Man Page Interface. |